aboutsummaryrefslogtreecommitdiff
path: root/lib/Bitcode/NaCl/Writer/NaClBitcodeWriter.cpp
diff options
context:
space:
mode:
authorKarl Schimpf <kschimpf@google.com>2013-09-04 13:34:52 -0700
committerKarl Schimpf <kschimpf@google.com>2013-09-04 13:34:52 -0700
commitd8f9bfbc093e7e0c1fab719bc014ba7c6f94ad6d (patch)
treef97b1b11573bba4db6a158514f83ee4e3ef77cb3 /lib/Bitcode/NaCl/Writer/NaClBitcodeWriter.cpp
parentf8ea6b0a1ed535c10089d53c93f32cfe0117c812 (diff)
Remove ARRAY/VECTOR types from PNaCl bitcode files.
The value selector list for switch statements are represented using ARRAY/VECTOR constants, but this information is not put into the bitcode file. This CL changes the value enumerator to not emit these constants. BUG= https://code.google.com/p/nativeclient/issues/detail?id=3649 R=mseaborn@chromium.org Review URL: https://codereview.chromium.org/23653013
Diffstat (limited to 'lib/Bitcode/NaCl/Writer/NaClBitcodeWriter.cpp')
-rw-r--r--lib/Bitcode/NaCl/Writer/NaClBitcodeWriter.cpp21
1 files changed, 4 insertions, 17 deletions
diff --git a/lib/Bitcode/NaCl/Writer/NaClBitcodeWriter.cpp b/lib/Bitcode/NaCl/Writer/NaClBitcodeWriter.cpp
index 3d5d50cc20..ec13266221 100644
--- a/lib/Bitcode/NaCl/Writer/NaClBitcodeWriter.cpp
+++ b/lib/Bitcode/NaCl/Writer/NaClBitcodeWriter.cpp
@@ -253,23 +253,10 @@ static void WriteTypeTable(const NaClValueEnumerator &VE,
}
case Type::StructTyID:
report_fatal_error("Struct types are not supported in PNaCl bitcode");
- case Type::ArrayTyID: {
- ArrayType *AT = cast<ArrayType>(T);
- // ARRAY: [numelts, eltty]
- Code = naclbitc::TYPE_CODE_ARRAY;
- TypeVals.push_back(AT->getNumElements());
- TypeVals.push_back(VE.getTypeID(AT->getElementType()));
- AbbrevToUse = TYPE_ARRAY_ABBREV;
- break;
- }
- case Type::VectorTyID: {
- VectorType *VT = cast<VectorType>(T);
- // VECTOR [numelts, eltty]
- Code = naclbitc::TYPE_CODE_VECTOR;
- TypeVals.push_back(VT->getNumElements());
- TypeVals.push_back(VE.getTypeID(VT->getElementType()));
- break;
- }
+ case Type::ArrayTyID:
+ report_fatal_error("Array types are not supported in PNaCl bitcode");
+ case Type::VectorTyID:
+ report_fatal_error("Vector types are not supported in PNaCl bitcode");
}
// Emit the finished record.