diff options
author | Mark Seaborn <mseaborn@chromium.org> | 2013-09-05 08:46:41 -0700 |
---|---|---|
committer | Mark Seaborn <mseaborn@chromium.org> | 2013-09-05 08:46:41 -0700 |
commit | 1180f259c88b1eb1000d0aaf5753b3da9f8e4e51 (patch) | |
tree | 93e5a4aa9aa5c5cedf8fe2c1137bef15e0ef081a /lib/Bitcode/NaCl/Writer/NaClValueEnumerator.cpp | |
parent | d8f9bfbc093e7e0c1fab719bc014ba7c6f94ad6d (diff) |
PNaCl bitcode: Don't output the LABEL type in the type table
The type ID for the "label" type is never referenced.
The "label" type was only being added to the type table because
EnumerateType() treats BasicBlock and Value operands the same.
However, the rest of the reader and writer treat BasicBlock operands
specially and not like other Values.
Change some tests to use wildcards for some type IDs. This is so that
I don't have to update all the type ID numbers now that the generated
type tables have changed.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3590
TEST=run small_tests with v2 bitcode format enabled
Review URL: https://codereview.chromium.org/23530031
Diffstat (limited to 'lib/Bitcode/NaCl/Writer/NaClValueEnumerator.cpp')
-rw-r--r-- | lib/Bitcode/NaCl/Writer/NaClValueEnumerator.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Bitcode/NaCl/Writer/NaClValueEnumerator.cpp b/lib/Bitcode/NaCl/Writer/NaClValueEnumerator.cpp index a58a421db2..64d7661415 100644 --- a/lib/Bitcode/NaCl/Writer/NaClValueEnumerator.cpp +++ b/lib/Bitcode/NaCl/Writer/NaClValueEnumerator.cpp @@ -299,6 +299,10 @@ void NaClValueEnumerator::EnumerateValue(const Value *VIn) { void NaClValueEnumerator::EnumerateType(Type *Ty, bool InsideOptimizeTypes) { + // The label type does not need to be given a type ID. + if (Ty->isLabelTy()) + return; + // This function is used to enumerate types referenced by the given // module. This function is called in two phases, based on the value // of TypeCountMap. These phases are: |