diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2009-05-30 05:06:04 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2009-05-30 05:06:04 +0000 |
commit | 29aaef84400cb8c822c5cb4477c05b39eaab36ed (patch) | |
tree | 45b56951ca455c4f0fffdc0e55733b84608162ef /lib/Bitcode | |
parent | 6df540f9bd0023f66f343726f62a6ec191af9bea (diff) | |
download | external_llvm-29aaef84400cb8c822c5cb4477c05b39eaab36ed.zip external_llvm-29aaef84400cb8c822c5cb4477c05b39eaab36ed.tar.gz external_llvm-29aaef84400cb8c822c5cb4477c05b39eaab36ed.tar.bz2 |
Give embedded metadata its own type instead of relying on EmptyStructTy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72610 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bitcode')
-rw-r--r-- | lib/Bitcode/Reader/BitcodeReader.cpp | 3 | ||||
-rw-r--r-- | lib/Bitcode/Writer/BitcodeWriter.cpp | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/lib/Bitcode/Reader/BitcodeReader.cpp b/lib/Bitcode/Reader/BitcodeReader.cpp index d2b4544..b4e16c3 100644 --- a/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/lib/Bitcode/Reader/BitcodeReader.cpp @@ -498,6 +498,9 @@ bool BitcodeReader::ParseTypeTable() { case bitc::TYPE_CODE_OPAQUE: // OPAQUE ResultTy = 0; break; + case bitc::TYPE_CODE_METADATA: // METADATA + ResultTy = Type::MetadataTy; + break; case bitc::TYPE_CODE_INTEGER: // INTEGER: [width] if (Record.size() < 1) return Error("Invalid Integer type record"); diff --git a/lib/Bitcode/Writer/BitcodeWriter.cpp b/lib/Bitcode/Writer/BitcodeWriter.cpp index 1ad70df..bfc029c 100644 --- a/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -206,6 +206,7 @@ static void WriteTypeTable(const ValueEnumerator &VE, BitstreamWriter &Stream) { case Type::PPC_FP128TyID: Code = bitc::TYPE_CODE_PPC_FP128; break; case Type::LabelTyID: Code = bitc::TYPE_CODE_LABEL; break; case Type::OpaqueTyID: Code = bitc::TYPE_CODE_OPAQUE; break; + case Type::MetadataTyID: Code = bitc::TYPE_CODE_METADATA; break; case Type::IntegerTyID: // INTEGER: [width] Code = bitc::TYPE_CODE_INTEGER; |