diff options
author | Owen Anderson <resistor@mac.com> | 2009-08-13 23:27:32 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-08-13 23:27:32 +0000 |
commit | 0e275dc53880a7f14f8b8c83cc6e0290a215492d (patch) | |
tree | 08ea0f696cb049a03061301387fce33e4ee18226 /lib/AsmParser/LLParser.cpp | |
parent | ec9b26100e06d566ccb4516c6fe3f2a685ecd941 (diff) |
Actually privatize a IntegerTypes, and fix a few bugs exposed by this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78955 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AsmParser/LLParser.cpp')
-rw-r--r-- | lib/AsmParser/LLParser.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/AsmParser/LLParser.cpp b/lib/AsmParser/LLParser.cpp index c3fd31ed4c..ec7bc650c4 100644 --- a/lib/AsmParser/LLParser.cpp +++ b/lib/AsmParser/LLParser.cpp @@ -1150,7 +1150,7 @@ bool LLParser::ParseTypeRec(PATypeHolder &Result) { break; case lltok::kw_opaque: // TypeRec ::= 'opaque' - Result = OpaqueType::get(); + Result = OpaqueType::get(Context); Lex.Lex(); break; case lltok::lbrace: @@ -1180,7 +1180,7 @@ bool LLParser::ParseTypeRec(PATypeHolder &Result) { if (const Type *T = M->getTypeByName(Lex.getStrVal())) { Result = T; } else { - Result = OpaqueType::get(); + Result = OpaqueType::get(Context); ForwardRefTypes.insert(std::make_pair(Lex.getStrVal(), std::make_pair(Result, Lex.getLoc()))); @@ -1199,7 +1199,7 @@ bool LLParser::ParseTypeRec(PATypeHolder &Result) { if (I != ForwardRefTypeIDs.end()) Result = I->second.first; else { - Result = OpaqueType::get(); + Result = OpaqueType::get(Context); ForwardRefTypeIDs.insert(std::make_pair(Lex.getUIntVal(), std::make_pair(Result, Lex.getLoc()))); @@ -1212,7 +1212,7 @@ bool LLParser::ParseTypeRec(PATypeHolder &Result) { Lex.Lex(); unsigned Val; if (ParseUInt32(Val)) return true; - OpaqueType *OT = OpaqueType::get(); //Use temporary placeholder. + OpaqueType *OT = OpaqueType::get(Context); //Use temporary placeholder. UpRefs.push_back(UpRefRecord(Lex.getLoc(), Val, OT)); Result = OT; break; |