aboutsummaryrefslogtreecommitdiff
path: root/lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp')
-rw-r--r--lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp36
1 files changed, 0 insertions, 36 deletions
diff --git a/lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp b/lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp
index 0eaab6d78b..9e8c398172 100644
--- a/lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp
+++ b/lib/Bitcode/NaCl/Reader/NaClBitcodeReader.cpp
@@ -402,8 +402,6 @@ bool NaClBitcodeReader::ParseTypeTableBody() {
SmallVector<uint64_t, 64> Record;
unsigned NumRecords = 0;
- SmallString<64> TypeName;
-
// Read all the records for this type table.
while (1) {
NaClBitstreamEntry Entry = Stream.advanceSkippingSubblocks();
@@ -505,40 +503,6 @@ bool NaClBitcodeReader::ParseTypeTableBody() {
ResultTy = StructType::get(Context, EltTys, Record[0]);
break;
}
- case naclbitc::TYPE_CODE_STRUCT_NAME: // STRUCT_NAME: [strchr x N]
- if (ConvertToString(Record, 0, TypeName))
- return Error("Invalid STRUCT_NAME record");
- continue;
-
- case naclbitc::TYPE_CODE_STRUCT_NAMED: { // STRUCT: [ispacked, eltty x N]
- if (Record.size() < 1)
- return Error("Invalid STRUCT type record");
-
- if (NumRecords >= TypeList.size())
- return Error("invalid TYPE table");
-
- // Check to see if this was forward referenced, if so fill in the temp.
- StructType *Res = cast_or_null<StructType>(TypeList[NumRecords]);
- if (Res) {
- Res->setName(TypeName);
- TypeList[NumRecords] = 0;
- } else // Otherwise, create a new struct.
- Res = StructType::create(Context, TypeName);
- TypeName.clear();
-
- SmallVector<Type*, 8> EltTys;
- for (unsigned i = 1, e = Record.size(); i != e; ++i) {
- if (Type *T = getTypeByID(Record[i]))
- EltTys.push_back(T);
- else
- break;
- }
- if (EltTys.size() != Record.size()-1)
- return Error("invalid STRUCT type record");
- Res->setBody(EltTys, Record[0]);
- ResultTy = Res;
- break;
- }
case naclbitc::TYPE_CODE_ARRAY: // ARRAY: [numelts, eltty]
if (Record.size() < 2)
return Error("Invalid ARRAY type record");