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
This commit is contained in:
Devang Patel 2009-02-24 23:15:09 +00:00
parent a7b42034fc
commit d8e880c670

View File

@ -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() << " ]";
}