diff options
author | Owen Anderson <resistor@mac.com> | 2009-08-05 23:16:16 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-08-05 23:16:16 +0000 |
commit | d7f2a6cb3fbc012763adb42fd967f6fefbb22a37 (patch) | |
tree | 0a2846e2b735aa45cedaa4266ffaa62786d07541 /lib/AsmParser | |
parent | 70cd88fb7b5b77f8bbca7417e624d11b6e22a7e7 (diff) | |
download | external_llvm-d7f2a6cb3fbc012763adb42fd967f6fefbb22a37.zip external_llvm-d7f2a6cb3fbc012763adb42fd967f6fefbb22a37.tar.gz external_llvm-d7f2a6cb3fbc012763adb42fd967f6fefbb22a37.tar.bz2 |
Privatize the StructType table, which unfortunately involves routing contexts through a number of APIs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78258 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AsmParser')
-rw-r--r-- | lib/AsmParser/LLParser.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/AsmParser/LLParser.cpp b/lib/AsmParser/LLParser.cpp index 0ba93b1..b5699ff 100644 --- a/lib/AsmParser/LLParser.cpp +++ b/lib/AsmParser/LLParser.cpp @@ -1381,7 +1381,7 @@ bool LLParser::ParseStructType(PATypeHolder &Result, bool Packed) { Lex.Lex(); // Consume the '{' if (EatIfPresent(lltok::rbrace)) { - Result = StructType::get(Packed); + Result = StructType::get(Context, Packed); return false; } @@ -1413,7 +1413,7 @@ bool LLParser::ParseStructType(PATypeHolder &Result, bool Packed) { std::vector<const Type*> ParamsListTy; for (unsigned i = 0, e = ParamsList.size(); i != e; ++i) ParamsListTy.push_back(ParamsList[i].get()); - Result = HandleUpRefs(StructType::get(ParamsListTy, Packed)); + Result = HandleUpRefs(StructType::get(Context, ParamsListTy, Packed)); return false; } @@ -1772,7 +1772,8 @@ bool LLParser::ParseValID(ValID &ID) { ParseToken(lltok::rbrace, "expected end of struct constant")) return true; - ID.ConstantVal = ConstantStruct::get(Elts.data(), Elts.size(), false); + ID.ConstantVal = ConstantStruct::get(Context, Elts.data(), + Elts.size(), false); ID.Kind = ValID::t_Constant; return false; } @@ -1792,7 +1793,7 @@ bool LLParser::ParseValID(ValID &ID) { if (isPackedStruct) { ID.ConstantVal = - ConstantStruct::get(Elts.data(), Elts.size(), true); + ConstantStruct::get(Context, Elts.data(), Elts.size(), true); ID.Kind = ValID::t_Constant; return false; } |