diff options
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/AsmParser/LLLexer.cpp | 3 | ||||
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/AccelTable.cpp | 8 | ||||
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/IR/DebugInfoMetadata.cpp | 3 |
4 files changed, 13 insertions, 3 deletions
diff --git a/llvm/lib/AsmParser/LLLexer.cpp b/llvm/lib/AsmParser/LLLexer.cpp index 23a7b44..7568fd4 100644 --- a/llvm/lib/AsmParser/LLLexer.cpp +++ b/llvm/lib/AsmParser/LLLexer.cpp @@ -944,7 +944,8 @@ lltok::Kind LLLexer::LexIdentifier() { return lltok::EmissionKind; } - if (Keyword == "GNU" || Keyword == "None" || Keyword == "Default") { + if (Keyword == "GNU" || Keyword == "Apple" || Keyword == "None" || + Keyword == "Default") { StrVal.assign(Keyword.begin(), Keyword.end()); return lltok::NameTableKind; } diff --git a/llvm/lib/CodeGen/AsmPrinter/AccelTable.cpp b/llvm/lib/CodeGen/AsmPrinter/AccelTable.cpp index a533551..5f9c3ea 100644 --- a/llvm/lib/CodeGen/AsmPrinter/AccelTable.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/AccelTable.cpp @@ -549,9 +549,13 @@ void llvm::emitDWARF5AccelTable( SmallVector<unsigned, 1> CUIndex(CUs.size()); int Count = 0; for (const auto &CU : enumerate(CUs)) { - if (CU.value()->getCUNode()->getNameTableKind() != - DICompileUnit::DebugNameTableKind::Default) + switch (CU.value()->getCUNode()->getNameTableKind()) { + case DICompileUnit::DebugNameTableKind::Default: + case DICompileUnit::DebugNameTableKind::Apple: + break; + default: continue; + } CUIndex[CU.index()] = Count++; assert(CU.index() == CU.value()->getUniqueID()); const DwarfCompileUnit *MainCU = diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp index ce6d9549..fd583a3 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp @@ -1432,6 +1432,8 @@ bool DwarfCompileUnit::hasDwarfPubSections() const { // generated for things like Gold's gdb_index generation. case DICompileUnit::DebugNameTableKind::GNU: return true; + case DICompileUnit::DebugNameTableKind::Apple: + return false; case DICompileUnit::DebugNameTableKind::Default: return DD->tuneForGDB() && !includeMinimalInlineScopes() && !CUNode->isDebugDirectivesOnly() && diff --git a/llvm/lib/IR/DebugInfoMetadata.cpp b/llvm/lib/IR/DebugInfoMetadata.cpp index ef51ec1..4933b603 100644 --- a/llvm/lib/IR/DebugInfoMetadata.cpp +++ b/llvm/lib/IR/DebugInfoMetadata.cpp @@ -970,6 +970,7 @@ DICompileUnit::getNameTableKind(StringRef Str) { return StringSwitch<std::optional<DebugNameTableKind>>(Str) .Case("Default", DebugNameTableKind::Default) .Case("GNU", DebugNameTableKind::GNU) + .Case("Apple", DebugNameTableKind::Apple) .Case("None", DebugNameTableKind::None) .Default(std::nullopt); } @@ -994,6 +995,8 @@ const char *DICompileUnit::nameTableKindString(DebugNameTableKind NTK) { return nullptr; case DebugNameTableKind::GNU: return "GNU"; + case DebugNameTableKind::Apple: + return "Apple"; case DebugNameTableKind::None: return "None"; } |