-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathllvm_includes.hpp
49 lines (43 loc) · 1.64 KB
/
llvm_includes.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef LLVM_INCLUDES_H
#define LLVM_INCLUDES_H
// llvm library includes, globals involving LLVM classes
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Weverything"
#include "llvm/ADT/APFloat.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/LegacyPassManager.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Type.h"
#include "llvm/IR/Verifier.h"
#include "llvm/MC/SubtargetFeature.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Host.h"
#include "llvm/Support/Program.h"
#include "llvm/Support/TargetRegistry.h"
#include "llvm/Support/TargetSelect.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetOptions.h"
#include "llvm/Transforms/InstCombine/InstCombine.h"
#include "llvm/Transforms/Scalar.h"
#include "llvm/Transforms/Scalar/GVN.h"
#include "llvm/Transforms/Utils.h"
#pragma clang diagnostic pop
static llvm::LLVMContext TheContext;
/*Builder keeps track of where we are in the IR and helps us generate
* instructions*/
static llvm::IRBuilder<> Builder(TheContext);
/*TheModule contains all functions and variables in the source program*/
typedef std::map<std::string, llvm::AllocaInst *> symbolTable;
static std::map<std::string, symbolTable> NamedValues;
static std::map<std::string, llvm::GlobalVariable *> GlobalValues;
static std::unique_ptr<llvm::legacy::FunctionPassManager> TheFPM;
#endif // __LLVM_INCLUDES_H_