diff options
| author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-02-13 01:29:28 +0000 |
|---|---|---|
| committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-02-13 01:29:28 +0000 |
| commit | a96d40999702c46894b6aad419e573a4bbc90673 (patch) | |
| tree | bf34989a887523bad13fa9f986b07d72d8c21b7c /llvm/lib/Bitcode/Writer | |
| parent | 890533e987c8ba71e09ea3cac19061d520dbbf23 (diff) | |
| download | bcm5719-llvm-a96d40999702c46894b6aad419e573a4bbc90673.tar.gz bcm5719-llvm-a96d40999702c46894b6aad419e573a4bbc90673.zip | |
AsmWriter/Bitcode: MDLexicalBlock
llvm-svn: 229016
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 f0453fff122..21dc5349cdc 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -978,11 +978,21 @@ static void WriteMDSubprogram(const MDSubprogram *N, Record.clear(); } -static void WriteMDLexicalBlock(const MDLexicalBlock *, const ValueEnumerator &, - BitstreamWriter &, SmallVectorImpl<uint64_t> &, - unsigned) { - llvm_unreachable("write not implemented"); +static void WriteMDLexicalBlock(const MDLexicalBlock *N, + const ValueEnumerator &VE, + BitstreamWriter &Stream, + SmallVectorImpl<uint64_t> &Record, + unsigned Abbrev) { + Record.push_back(N->isDistinct()); + Record.push_back(VE.getMetadataOrNullID(N->getScope())); + Record.push_back(VE.getMetadataOrNullID(N->getFile())); + Record.push_back(N->getLine()); + Record.push_back(N->getColumn()); + + Stream.EmitRecord(bitc::METADATA_LEXICAL_BLOCK, Record, Abbrev); + Record.clear(); } + static void WriteMDLexicalBlockFile(const MDLexicalBlockFile *, const ValueEnumerator &, BitstreamWriter &, SmallVectorImpl<uint64_t> &, unsigned) { |

