aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/AsmParser/LLParser.cpp6
-rw-r--r--lib/AsmParser/LLParser.h2
2 files changed, 5 insertions, 3 deletions
diff --git a/lib/AsmParser/LLParser.cpp b/lib/AsmParser/LLParser.cpp
index cdad077..7eff9cc 100644
--- a/lib/AsmParser/LLParser.cpp
+++ b/lib/AsmParser/LLParser.cpp
@@ -2933,6 +2933,8 @@ bool LLParser::ParseBasicBlock(PerFunctionState &PFS) {
default: assert(0 && "Unknown ParseInstruction result!");
case InstError: return true;
case InstNormal:
+ BB->getInstList().push_back(Inst);
+
// With a normal result, we check to see if the instruction is followed by
// a comma and metadata.
if (EatIfPresent(lltok::comma))
@@ -2940,6 +2942,8 @@ bool LLParser::ParseBasicBlock(PerFunctionState &PFS) {
return true;
break;
case InstExtraComma:
+ BB->getInstList().push_back(Inst);
+
// If the instruction parser ate an extra comma at the end of it, it
// *must* be followed by metadata.
if (ParseInstructionMetadata(Inst))
@@ -2947,8 +2951,6 @@ bool LLParser::ParseBasicBlock(PerFunctionState &PFS) {
break;
}
- BB->getInstList().push_back(Inst);
-
// Set the name on the instruction.
if (PFS.SetInstName(NameID, NameStr, NameLoc, Inst)) return true;
} while (!isa<TerminatorInst>(Inst));
diff --git a/lib/AsmParser/LLParser.h b/lib/AsmParser/LLParser.h
index ae460bb..c8f669f 100644
--- a/lib/AsmParser/LLParser.h
+++ b/lib/AsmParser/LLParser.h
@@ -74,7 +74,7 @@ namespace llvm {
public:
typedef LLLexer::LocTy LocTy;
private:
- LLVMContext& Context;
+ LLVMContext &Context;
LLLexer Lex;
Module *M;