mirror of
https://github.com/PashaBibko/LX.git
synced 2026-04-03 17:39:02 +00:00
Made projects use PCHs
This commit is contained in:
@@ -1,6 +1,27 @@
|
|||||||
// dllmain.cpp : Defines the entry point for the DLL application.
|
// dllmain.cpp : Defines the entry point for the DLL application.
|
||||||
#include <LX-Common.h>
|
#include <LX-Common.h>
|
||||||
|
|
||||||
|
namespace LX
|
||||||
|
{
|
||||||
|
using DllFunc = bool(HMODULE);
|
||||||
|
|
||||||
|
static bool ProcAttach(HMODULE hModule)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool ProcDetach(HMODULE hModule)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool ThreadAttach(HMODULE hModule)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool ThreadDetach(HMODULE hModule)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
BOOL __stdcall DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
|
BOOL __stdcall DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
|
||||||
{
|
{
|
||||||
switch (ul_reason_for_call)
|
switch (ul_reason_for_call)
|
||||||
|
|||||||
@@ -115,6 +115,8 @@
|
|||||||
<ConformanceMode>true</ConformanceMode>
|
<ConformanceMode>true</ConformanceMode>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir)common;$(ProjectDir)inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir)common;$(ProjectDir)inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<LanguageStandard>stdcpp20</LanguageStandard>
|
<LanguageStandard>stdcpp20</LanguageStandard>
|
||||||
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
|
<PrecompiledHeaderFile>LX-Common.h</PrecompiledHeaderFile>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
@@ -133,6 +135,8 @@
|
|||||||
<ConformanceMode>true</ConformanceMode>
|
<ConformanceMode>true</ConformanceMode>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir)common;$(ProjectDir)inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir)common;$(ProjectDir)inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<LanguageStandard>stdcpp20</LanguageStandard>
|
<LanguageStandard>stdcpp20</LanguageStandard>
|
||||||
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
|
<PrecompiledHeaderFile>LX-Common.h</PrecompiledHeaderFile>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
@@ -144,6 +148,10 @@
|
|||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<ClCompile Include="inc\pch.cpp">
|
||||||
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
|
||||||
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
|
||||||
|
</ClCompile>
|
||||||
<ClCompile Include="src\Generator.cpp" />
|
<ClCompile Include="src\Generator.cpp" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -14,6 +14,9 @@
|
|||||||
<ClCompile Include="src\Generator.cpp">
|
<ClCompile Include="src\Generator.cpp">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="inc\pch.cpp">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="inc\Lexer.h">
|
<ClInclude Include="inc\Lexer.h">
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <LX-Common.h>
|
||||||
|
|
||||||
// Lexer foward declares fstream components so we can use them here //
|
// Lexer foward declares fstream components so we can use them here //
|
||||||
#include <Lexer.h>
|
#include <Lexer.h>
|
||||||
|
|
||||||
#include <LX-Common.h>
|
|
||||||
|
|
||||||
// Foward declares the wrapper around the LLVM objects we need to pass around //
|
// Foward declares the wrapper around the LLVM objects we need to pass around //
|
||||||
namespace LX { struct InfoLLVM; }
|
namespace LX { struct InfoLLVM; }
|
||||||
|
|
||||||
|
|||||||
2
IR-Generator/inc/pch.cpp
Normal file
2
IR-Generator/inc/pch.cpp
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
// Wow, such an intresting file. Don't put anything else in here //
|
||||||
|
#include <LX-Common.h>
|
||||||
@@ -114,6 +114,8 @@
|
|||||||
<ConformanceMode>true</ConformanceMode>
|
<ConformanceMode>true</ConformanceMode>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir)common;$(ProjectDir)inc;$(SolutionDir)IR-Generator\inc</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir)common;$(ProjectDir)inc;$(SolutionDir)IR-Generator\inc</AdditionalIncludeDirectories>
|
||||||
<LanguageStandard>stdcpp20</LanguageStandard>
|
<LanguageStandard>stdcpp20</LanguageStandard>
|
||||||
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
|
<PrecompiledHeaderFile>LX-Common.h</PrecompiledHeaderFile>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
@@ -130,6 +132,8 @@
|
|||||||
<ConformanceMode>true</ConformanceMode>
|
<ConformanceMode>true</ConformanceMode>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir)common;$(ProjectDir)inc;$(SolutionDir)IR-Generator\inc</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir)common;$(ProjectDir)inc;$(SolutionDir)IR-Generator\inc</AdditionalIncludeDirectories>
|
||||||
<LanguageStandard>stdcpp20</LanguageStandard>
|
<LanguageStandard>stdcpp20</LanguageStandard>
|
||||||
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
|
<PrecompiledHeaderFile>LX-Common.h</PrecompiledHeaderFile>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
@@ -139,6 +143,10 @@
|
|||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<ClCompile Include="inc\pch.cpp">
|
||||||
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
|
||||||
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
|
||||||
|
</ClCompile>
|
||||||
<ClCompile Include="src\Lexer.cpp" />
|
<ClCompile Include="src\Lexer.cpp" />
|
||||||
<ClCompile Include="src\Token.cpp" />
|
<ClCompile Include="src\Token.cpp" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@@ -17,5 +17,8 @@
|
|||||||
<ClCompile Include="src\Token.cpp">
|
<ClCompile Include="src\Token.cpp">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="inc\pch.cpp">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
2
Lexer/inc/pch.cpp
Normal file
2
Lexer/inc/pch.cpp
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
// Wow, such an intresting file. Don't put anything else in here //
|
||||||
|
#include <LX-Common.h>
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
#include <Lexer.h>
|
|
||||||
|
|
||||||
#include <LX-Common.h>
|
#include <LX-Common.h>
|
||||||
|
|
||||||
|
#include <Lexer.h>
|
||||||
|
|
||||||
namespace LX
|
namespace LX
|
||||||
{
|
{
|
||||||
std::string* InvalidCharInSource::s_Source = nullptr;
|
std::string* InvalidCharInSource::s_Source = nullptr;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#include <Lexer.h>
|
|
||||||
|
|
||||||
#include <LX-Common.h>
|
#include <LX-Common.h>
|
||||||
|
|
||||||
|
#include <Lexer.h>
|
||||||
|
|
||||||
namespace LX
|
namespace LX
|
||||||
{
|
{
|
||||||
// Creates the memory for the pointer to the source //
|
// Creates the memory for the pointer to the source //
|
||||||
|
|||||||
@@ -114,6 +114,8 @@
|
|||||||
<ConformanceMode>true</ConformanceMode>
|
<ConformanceMode>true</ConformanceMode>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir)common;$(ProjectDir)inc;$(SolutionDir)IR-Generator\inc</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir)common;$(ProjectDir)inc;$(SolutionDir)IR-Generator\inc</AdditionalIncludeDirectories>
|
||||||
<LanguageStandard>stdcpp20</LanguageStandard>
|
<LanguageStandard>stdcpp20</LanguageStandard>
|
||||||
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
|
<PrecompiledHeaderFile>LX-Common.h</PrecompiledHeaderFile>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
@@ -130,6 +132,8 @@
|
|||||||
<ConformanceMode>true</ConformanceMode>
|
<ConformanceMode>true</ConformanceMode>
|
||||||
<AdditionalIncludeDirectories>$(SolutionDir)common;$(ProjectDir)inc;$(SolutionDir)IR-Generator\inc</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(SolutionDir)common;$(ProjectDir)inc;$(SolutionDir)IR-Generator\inc</AdditionalIncludeDirectories>
|
||||||
<LanguageStandard>stdcpp20</LanguageStandard>
|
<LanguageStandard>stdcpp20</LanguageStandard>
|
||||||
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
|
<PrecompiledHeaderFile>LX-Common.h</PrecompiledHeaderFile>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
@@ -139,6 +143,10 @@
|
|||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<ClCompile Include="inc\pch.cpp">
|
||||||
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
|
||||||
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
|
||||||
|
</ClCompile>
|
||||||
<ClCompile Include="src\AST-Constructors.cpp" />
|
<ClCompile Include="src\AST-Constructors.cpp" />
|
||||||
<ClCompile Include="src\AST-LLVM.cpp" />
|
<ClCompile Include="src\AST-LLVM.cpp" />
|
||||||
<ClCompile Include="src\AST-Loggers.cpp" />
|
<ClCompile Include="src\AST-Loggers.cpp" />
|
||||||
|
|||||||
@@ -32,6 +32,9 @@
|
|||||||
<ClCompile Include="src\ParserErrors.cpp">
|
<ClCompile Include="src\ParserErrors.cpp">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="inc\pch.cpp">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="inc\AST.h">
|
<ClInclude Include="inc\AST.h">
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#include <Parser.h>
|
|
||||||
|
|
||||||
#include <LX-Common.h>
|
#include <LX-Common.h>
|
||||||
|
|
||||||
|
#include <Parser.h>
|
||||||
|
|
||||||
namespace LX
|
namespace LX
|
||||||
{
|
{
|
||||||
// Wrapper over the LLVM variables for easier passing around //
|
// Wrapper over the LLVM variables for easier passing around //
|
||||||
|
|||||||
2
Parser/inc/pch.cpp
Normal file
2
Parser/inc/pch.cpp
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
// Wow, such an intresting file. Don't put anything else in here //
|
||||||
|
#include <LX-Common.h>
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
#include <LX-Common.h>
|
||||||
|
|
||||||
#include <Parser.h>
|
#include <Parser.h>
|
||||||
|
|
||||||
#include <AST.h>
|
#include <AST.h>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#include <Parser.h>
|
|
||||||
|
|
||||||
#include <LX-Common.h>
|
#include <LX-Common.h>
|
||||||
|
|
||||||
|
#include <Parser.h>
|
||||||
|
|
||||||
#include <AST.h>
|
#include <AST.h>
|
||||||
|
|
||||||
namespace LX::AST
|
namespace LX::AST
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#include <AST.h>
|
|
||||||
|
|
||||||
#include <LX-Common.h>
|
#include <LX-Common.h>
|
||||||
|
|
||||||
|
#include <AST.h>
|
||||||
|
|
||||||
namespace LX::AST
|
namespace LX::AST
|
||||||
{
|
{
|
||||||
void MultiNode::Log(std::ofstream* log, unsigned depth)
|
void MultiNode::Log(std::ofstream* log, unsigned depth)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#include <Parser.h>
|
|
||||||
|
|
||||||
#include <LX-Common.h>
|
#include <LX-Common.h>
|
||||||
|
|
||||||
|
#include <Parser.h>
|
||||||
|
|
||||||
#include <AST.h>
|
#include <AST.h>
|
||||||
|
|
||||||
namespace LX
|
namespace LX
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#include <Parser.h>
|
|
||||||
|
|
||||||
#include <LX-Common.h>
|
#include <LX-Common.h>
|
||||||
|
|
||||||
|
#include <Parser.h>
|
||||||
|
|
||||||
#include <AST.h>
|
#include <AST.h>
|
||||||
|
|
||||||
namespace LX
|
namespace LX
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#include <Parser.h>
|
|
||||||
|
|
||||||
#include <LX-Common.h>
|
#include <LX-Common.h>
|
||||||
|
|
||||||
|
#include <Parser.h>
|
||||||
|
|
||||||
namespace LX
|
namespace LX
|
||||||
{
|
{
|
||||||
void IRGenerationError::PrintToConsole() const
|
void IRGenerationError::PrintToConsole() const
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#include <Parser.h>
|
|
||||||
|
|
||||||
#include <LX-Common.h>
|
#include <LX-Common.h>
|
||||||
|
|
||||||
|
#include <Parser.h>
|
||||||
|
|
||||||
#include <AST.h>
|
#include <AST.h>
|
||||||
|
|
||||||
namespace LX
|
namespace LX
|
||||||
|
|||||||
BIN
example/Main.exe
BIN
example/Main.exe
Binary file not shown.
@@ -1,6 +1,7 @@
|
|||||||
func main()
|
func main()
|
||||||
{
|
{
|
||||||
int a @
|
int a
|
||||||
|
a = 65465
|
||||||
|
|
||||||
int b
|
int b
|
||||||
b = 6
|
b = 6
|
||||||
|
|||||||
BIN
example/main.obj
BIN
example/main.obj
Binary file not shown.
Reference in New Issue
Block a user