From: Devang Patel Date: Tue, 24 Feb 2009 23:15:09 +0000 (+0000) Subject: If compile unit's language is not set then don't crash while dump'ing compile unit. X-Git-Tag: android-x86-6.0-r1~1003^2~22282 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=d8e880c670699bd56dc3968647a4b963793d201d;p=android-x86%2Fexternal-llvm.git If compile unit's language is not set then don't crash while dump'ing compile unit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65402 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/DebugInfo.cpp b/lib/Analysis/DebugInfo.cpp index 12bb2921f51..deb5c9bbfb4 100644 --- a/lib/Analysis/DebugInfo.cpp +++ b/lib/Analysis/DebugInfo.cpp @@ -862,7 +862,8 @@ namespace llvm { /// dump - print compile unit. void DICompileUnit::dump() const { - cerr << " [" << dwarf::LanguageString(getLanguage()) << "] "; + if (getLanguage()) + cerr << " [" << dwarf::LanguageString(getLanguage()) << "] "; cerr << " [" << getDirectory() << "/" << getFilename() << " ]"; }