summaryrefslogtreecommitdiff
path: root/Context.cc
blob: fd4a7a501836bdab89cf8da8ab623e91e366d655 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <llvm/IR/LLVMContext.h>

#include "Context.hh"

namespace pcc {
llvm::LLVMContext GlobalContext;

Context::Context(const char* name)
    : builder_(GlobalContext)
    , module_(name, GlobalContext) {}

llvm::Module* Context::GetModule() { return &module_; }

llvm::IRBuilder<>* Context::GetBuilder() { return &builder_; }
} // namespace pcc