diff options
author | David Blaikie <dblaikie@gmail.com> | 2013-02-04 05:31:37 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2013-02-04 05:31:37 +0000 |
commit | a9b1317443990533f56a8420c0fbfb8868dad566 (patch) | |
tree | 2c75249dc5545ebf60449fb24b30d514fe5909e1 | |
parent | 6c355ee42714a92942b3b2368c1038bb01dc2641 (diff) | |
download | external_llvm-a9b1317443990533f56a8420c0fbfb8868dad566.zip external_llvm-a9b1317443990533f56a8420c0fbfb8868dad566.tar.gz external_llvm-a9b1317443990533f56a8420c0fbfb8868dad566.tar.bz2 |
PR15149: crash when printing debug info metadata containing an invalid language spec
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174304 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/IR/DebugInfo.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/IR/DebugInfo.cpp b/lib/IR/DebugInfo.cpp index c983787..ecaab1f 100644 --- a/lib/IR/DebugInfo.cpp +++ b/lib/IR/DebugInfo.cpp @@ -1058,8 +1058,8 @@ void DIScope::printInternal(raw_ostream &OS) const { void DICompileUnit::printInternal(raw_ostream &OS) const { DIScope::printInternal(OS); - if (unsigned Lang = getLanguage()) - OS << " [" << dwarf::LanguageString(Lang) << ']'; + if (const char *Lang = dwarf::LanguageString(getLanguage())) + OS << " [" << Lang << ']'; } void DIEnumerator::printInternal(raw_ostream &OS) const { |