diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-02-13 01:46:02 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-02-13 01:46:02 +0000 |
commit | 1c9311648969b6160aa7643e9c0dd6c79462012f (patch) | |
tree | 6118ea0c55aa6a352f6a0f9a052d09d69a263eff /llvm/lib/Bitcode/Writer | |
parent | d45ce96c3878a410d812f1f0825d9c6173da92a4 (diff) | |
download | bcm5719-llvm-1c9311648969b6160aa7643e9c0dd6c79462012f.tar.gz bcm5719-llvm-1c9311648969b6160aa7643e9c0dd6c79462012f.zip |
AsmWriter/Bitcode: MDImportedEntity
llvm-svn: 229025
Diffstat (limited to 'llvm/lib/Bitcode/Writer')
-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 ee522c41d16..0a3c57e8c26 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -1124,10 +1124,20 @@ static void WriteMDObjCProperty(const MDObjCProperty *N, Record.clear(); } -static void WriteMDImportedEntity(const MDImportedEntity *, - const ValueEnumerator &, BitstreamWriter &, - SmallVectorImpl<uint64_t> &, unsigned) { - llvm_unreachable("write not implemented"); +static void WriteMDImportedEntity(const MDImportedEntity *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->getScope())); + Record.push_back(VE.getMetadataOrNullID(N->getEntity())); + Record.push_back(N->getLine()); + Record.push_back(VE.getMetadataOrNullID(N->getRawName())); + + Stream.EmitRecord(bitc::METADATA_IMPORTED_ENTITY, Record, Abbrev); + Record.clear(); } static void WriteModuleMetadata(const Module *M, |