mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +00:00
Refactor some parser interfaces to fix PR3278 and a FIXME:
ParseAssemblyString with a specified module would not parse into the module, it would create and return a new one. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61635 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user