diff options
| author | Nagi5Yeq <wu@x-nagi.com> | 2020-05-15 21:16:26 +0800 |
|---|---|---|
| committer | Nagi5Yeq <wu@x-nagi.com> | 2020-05-15 21:16:26 +0800 |
| commit | 41f6e75e3f26bdcccfcb3910f202452e14653826 (patch) | |
| tree | 0076a928d4ac9737f8b83b7b6b0c055e5ff4f46a /Driver.cc | |
| parent | d80958f987790f533f5048c2e0e8a1cd5fd9f5a1 (diff) | |
basic support of types
Diffstat (limited to 'Driver.cc')
| -rw-r--r-- | Driver.cc | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -2,8 +2,8 @@ #include "Parser.hh" namespace pcc { -Driver::Driver(Context* context) - : context_(context) {} +Driver::Driver(const char* name) + : context_(name) {} Driver::~Driver() {} @@ -12,12 +12,8 @@ void Driver::Parse(std::string& filename) { if (StartLexer(filename) != 0) { return; } - Parser parser(*this); + Parser parser(*this, &context_); parser.parse(); StopLexer(); } - -llvm::Module* Driver::GetModule() { return &context_->module_; } - -llvm::IRBuilder<>* Driver::GetBuilder() { return &context_->builder_; } } // namespace pcc |
