summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/IR/DebugInfo.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/IR/DebugInfo.cpp b/lib/IR/DebugInfo.cpp
index 0ffe99d7045..10beb698243 100644
--- a/lib/IR/DebugInfo.cpp
+++ b/lib/IR/DebugInfo.cpp
@@ -1054,8 +1054,13 @@ void DIScope::printInternal(raw_ostream &OS) const {
void DICompileUnit::printInternal(raw_ostream &OS) const {
DIScope::printInternal(OS);
- if (const char *Lang = dwarf::LanguageString(getLanguage()))
- OS << " [" << Lang << ']';
+ OS << " [";
+ unsigned Lang = getLanguage();
+ if (const char *LangStr = dwarf::LanguageString(Lang))
+ OS << LangStr;
+ else
+ (OS << "lang 0x").write_hex(Lang);
+ OS << ']';
}
void DIEnumerator::printInternal(raw_ostream &OS) const {