summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode/Writer
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-02-13 01:19:14 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-02-13 01:19:14 +0000
commitf14b9c7cc16f24357f2c7db95e84015f79be8b38 (patch)
tree5f8cd93291e6a88a92d3b2e005a471f146eaa2c2 /llvm/lib/Bitcode/Writer
parentcd6636c3bf05e86396b097ce1623ab9993d5adcb (diff)
downloadbcm5719-llvm-f14b9c7cc16f24357f2c7db95e84015f79be8b38.tar.gz
bcm5719-llvm-f14b9c7cc16f24357f2c7db95e84015f79be8b38.zip
AsmWriter/Bitcode: MDFile
llvm-svn: 229007
Diffstat (limited to 'llvm/lib/Bitcode/Writer')
-rw-r--r--llvm/lib/Bitcode/Writer/BitcodeWriter.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
index 47c414eea8a..9460ff0a78b 100644
--- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -868,11 +868,18 @@ static void WriteMDSubroutineType(const MDSubroutineType *,
SmallVectorImpl<uint64_t> &, unsigned) {
llvm_unreachable("write not implemented");
}
-static void WriteMDFile(const MDFile *, const ValueEnumerator &,
- BitstreamWriter &, SmallVectorImpl<uint64_t> &,
- unsigned) {
- llvm_unreachable("write not implemented");
+
+static void WriteMDFile(const MDFile *N, const ValueEnumerator &VE,
+ BitstreamWriter &Stream,
+ SmallVectorImpl<uint64_t> &Record, unsigned Abbrev) {
+ Record.push_back(N->isDistinct());
+ Record.push_back(VE.getMetadataOrNullID(N->getRawFilename()));
+ Record.push_back(VE.getMetadataOrNullID(N->getRawDirectory()));
+
+ Stream.EmitRecord(bitc::METADATA_FILE, Record, Abbrev);
+ Record.clear();
}
+
static void WriteMDCompileUnit(const MDCompileUnit *, const ValueEnumerator &,
BitstreamWriter &, SmallVectorImpl<uint64_t> &,
unsigned) {
OpenPOWER on IntegriCloud