[llvm] r174304 - PR15149: crash when printing debug info metadata containing an invalid language spec
David Blaikie
dblaikie at gmail.com
Sun Feb 3 21:31:37 PST 2013
Author: dblaikie
Date: Sun Feb 3 23:31:37 2013
New Revision: 174304
URL: http://llvm.org/viewvc/llvm-project?rev=174304&view=rev
Log:
PR15149: crash when printing debug info metadata containing an invalid language spec
Modified:
llvm/trunk/lib/IR/DebugInfo.cpp
Modified: llvm/trunk/lib/IR/DebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DebugInfo.cpp?rev=174304&r1=174303&r2=174304&view=diff
==============================================================================
--- llvm/trunk/lib/IR/DebugInfo.cpp (original)
+++ llvm/trunk/lib/IR/DebugInfo.cpp Sun Feb 3 23:31:37 2013
@@ -1058,8 +1058,8 @@ void DIScope::printInternal(raw_ostream
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 {
More information about the llvm-commits
mailing list