1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00

Support: Stop stringifying DW_LANG_{lo,hi}_user

llvm-svn: 228451
This commit is contained in:
Duncan P. N. Exon Smith 2015-02-06 22:34:48 +00:00
parent 37668ce7d1
commit 76b9077d2d
2 changed files with 10 additions and 2 deletions

View File

@ -507,9 +507,7 @@ const char *llvm::dwarf::LanguageString(unsigned Language) {
case DW_LANG_C_plus_plus_03: return "DW_LANG_C_plus_plus_03";
case DW_LANG_C_plus_plus_11: return "DW_LANG_C_plus_plus_11";
case DW_LANG_OCaml: return "DW_LANG_OCaml";
case DW_LANG_lo_user: return "DW_LANG_lo_user";
case DW_LANG_Mips_Assembler: return "DW_LANG_Mips_Assembler";
case DW_LANG_hi_user: return "DW_LANG_hi_user";
}
return nullptr;
}

View File

@ -42,4 +42,14 @@ TEST(DwarfTest, getTag) {
EXPECT_EQ(DW_TAG_invalid, getTag("DW_TAG_user_base"));
}
TEST(DwarfTest, LanguageStringOnInvalid) {
// This is invalid, so it shouldn't be stringified.
EXPECT_EQ(nullptr, LanguageString(0));
// These aren't really tags: they describe ranges within tags. They
// shouldn't be stringified either.
EXPECT_EQ(nullptr, LanguageString(DW_LANG_lo_user));
EXPECT_EQ(nullptr, LanguageString(DW_LANG_hi_user));
}
} // end namespace