summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/AsmWriter.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-02-13 01:21:25 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-02-13 01:21:25 +0000
commitaece2dc3f574fb7390e3e23b21eef5387dd8e716 (patch)
treee4b0a3978de4012cf8fb0662e34ae5afc50bfe4a /llvm/lib/IR/AsmWriter.cpp
parent171d077ae44a4a16d12f32db0c3cb100864949c7 (diff)
downloadbcm5719-llvm-aece2dc3f574fb7390e3e23b21eef5387dd8e716.tar.gz
bcm5719-llvm-aece2dc3f574fb7390e3e23b21eef5387dd8e716.zip
AsmWriter: MDCompositeType: Recognize DW_LANG in 'runtimeLang'
llvm-svn: 229010
Diffstat (limited to 'llvm/lib/IR/AsmWriter.cpp')
-rw-r--r--llvm/lib/IR/AsmWriter.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/llvm/lib/IR/AsmWriter.cpp b/llvm/lib/IR/AsmWriter.cpp
index 77e2b2d64b9..0a585a097e2 100644
--- a/llvm/lib/IR/AsmWriter.cpp
+++ b/llvm/lib/IR/AsmWriter.cpp
@@ -1461,8 +1461,14 @@ static void writeMDCompositeType(raw_ostream &Out, const MDCompositeType *N,
writeMetadataAsOperand(Out, N->getElements(), TypePrinter, Machine,
Context);
}
- if (N->getRuntimeLang())
- Out << FS << "runtimeLang: " << N->getRuntimeLang();
+ if (unsigned Lang = N->getRuntimeLang()) {
+ Out << FS << "runtimeLang: ";
+ if (const char *S = dwarf::LanguageString(Lang))
+ Out << S;
+ else
+ Out << Lang;
+ }
+
if (N->getVTableHolder()) {
Out << FS << "vtableHolder: ";
writeMetadataAsOperand(Out, N->getVTableHolder(), TypePrinter, Machine,
OpenPOWER on IntegriCloud