Made common a project

This commit is contained in:
Pasha Bibko
2025-05-05 16:45:34 +01:00
parent 616ed1ca21
commit c64a2c692c
27 changed files with 337 additions and 146 deletions

59
Common/LX-Common.h Normal file
View File

@@ -0,0 +1,59 @@
// This is a precompiled header file. //
// Files listed below are compiled only once, improving build performance for future builds. //
// This also affects IntelliSense performance, including code completion and many code browsing features. //
// However, files listed here are ALL re-compiled if any one of them is updated between builds. //
// Do not add files here that you will be updating frequently as this negates the performance advantage. //
#pragma once
// Includes Windows API if on the correct system //
#ifdef _WIN32
#define NOMINMAX
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
// Else alerts the user that their system is not supported //
#else
#error "This code is only designed to work on windows"
#endif // _WIN32
// Checks the user is using MSVC as it is required for this code to compile //
#ifndef _MSC_VER
#error "This code is only designed to work with Visual Studio"
#endif // _MSC_VER
// Includes commonly used STD files //
#include <unordered_map>
#include <string_view>
#include <type_traits>
#include <filesystem>
#include <iostream>
#include <iomanip>
#include <sstream>
#include <fstream>
#include <string>
#include <vector>
#include <memory>
// Includes LLVM files (disables warnings thrown by them) //
#pragma warning(push)
#pragma warning(disable : 4244)
#pragma warning(disable : 4267)
#pragma warning(disable : 4624)
#pragma warning(disable : 4800)
#include <llvm/IR/IRBuilder.h>
#include <llvm/IR/LLVMContext.h>
#include <llvm/IR/Module.h>
#include <llvm/IR/Verifier.h>
#pragma warning(pop) // <- Renables all warnings
// Includes the rest of common //
#include <inc/Console.h>
#include <inc/Error.h>
#include <inc/Logger.h>
#include <inc/ThrowIf.h>