diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-02-13 01:14:58 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-02-13 01:14:58 +0000 |
commit | 09e03f38d664ed09b6add37050c2df6cf1116272 (patch) | |
tree | d039abc6012ba4fc9b945c6b1d995d024253a6b7 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | |
parent | 87754764199bf7547b5336b35e9a704143c177b7 (diff) | |
download | llvm-09e03f38d664ed09b6add37050c2df6cf1116272.zip llvm-09e03f38d664ed09b6add37050c2df6cf1116272.tar.gz llvm-09e03f38d664ed09b6add37050c2df6cf1116272.tar.bz2 |
AsmWriter/Bitcode: MDBasicType
llvm-svn: 229005
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
-rw-r--r-- | llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp index dfbfc9c..47c414e 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -838,11 +838,21 @@ static void WriteMDEnumerator(const MDEnumerator *N, const ValueEnumerator &VE, Record.clear(); } -static void WriteMDBasicType(const MDBasicType *, const ValueEnumerator &, - BitstreamWriter &, SmallVectorImpl<uint64_t> &, - unsigned) { - llvm_unreachable("write not implemented"); +static void WriteMDBasicType(const MDBasicType *N, const ValueEnumerator &VE, + BitstreamWriter &Stream, + SmallVectorImpl<uint64_t> &Record, + unsigned Abbrev) { + Record.push_back(N->isDistinct()); + Record.push_back(N->getTag()); + Record.push_back(VE.getMetadataOrNullID(N->getRawName())); + Record.push_back(N->getSizeInBits()); + Record.push_back(N->getAlignInBits()); + Record.push_back(N->getEncoding()); + + Stream.EmitRecord(bitc::METADATA_BASIC_TYPE, Record, Abbrev); + Record.clear(); } + static void WriteMDDerivedType(const MDDerivedType *, const ValueEnumerator &, BitstreamWriter &, SmallVectorImpl<uint64_t> &, unsigned) { |