diff options
Diffstat (limited to 'lib/AsmParser/LLParser.cpp')
-rw-r--r-- | lib/AsmParser/LLParser.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/lib/AsmParser/LLParser.cpp b/lib/AsmParser/LLParser.cpp index 5582bfa7f1..e44e65057c 100644 --- a/lib/AsmParser/LLParser.cpp +++ b/lib/AsmParser/LLParser.cpp @@ -51,19 +51,12 @@ namespace llvm { } /// Run: module ::= toplevelentity* -Module *LLParser::Run() { - M = new Module(Lex.getFilename()); - +bool LLParser::Run() { // Prime the lexer. Lex.Lex(); - if (ParseTopLevelEntities() || - ValidateEndOfModule()) { - delete M; - return 0; - } - - return M; + return ParseTopLevelEntities() || + ValidateEndOfModule(); } /// ValidateEndOfModule - Do final validity and sanity checks at the end of the |