PR15149: crash when printing debug info metadata containing an invalid language spec

llvm-svn: 174304
This commit is contained in:
David Blaikie 2013-02-04 05:31:37 +00:00
parent cc4aaef0f2
commit ab1e7cac99
1 changed files with 2 additions and 2 deletions

View File

@ -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 {