diff options
| author | Nagi5Yeq <wu@x-nagi.com> | 2020-05-12 01:52:49 +0800 |
|---|---|---|
| committer | Nagi5Yeq <wu@x-nagi.com> | 2020-05-12 01:52:49 +0800 |
| commit | f146dac784325c9403499046f52f70e3596ae345 (patch) | |
| tree | 4af8b76cbf83892d3cbfdda7a4b17fa8af34b4a0 /Context.hh | |
initial commit
Diffstat (limited to 'Context.hh')
| -rw-r--r-- | Context.hh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Context.hh b/Context.hh new file mode 100644 index 0000000..bc66632 --- /dev/null +++ b/Context.hh @@ -0,0 +1,22 @@ +#ifndef PCC_CONTEXT_H +#define PCC_CONTEXT_H + +#include <llvm/IR/IRBuilder.h> +#include <llvm/IR/Module.h> + +namespace pcc { +class Driver; +class Context { + public: + Context(const char* name); + + private: + llvm::IRBuilder<> builder_; + llvm::Module module_; + friend class Driver; +}; + +extern llvm::LLVMContext GlobalContext; +} // namespace pcc + +#endif |
