summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 94e12658cfe..184ec4dabe9 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -971,6 +971,10 @@ void DwarfDebug::endModule() {
// Emit the pubnames and pubtypes sections if requested.
emitDebugPubSections();
+ const Triple &TT = Asm->TM.getTargetTriple();
+ if (TT.getArch() == Triple::bpfel || TT.getArch() == Triple::bpfeb)
+ emitBTFSection(TT.getArch() == Triple::bpfel);
+
// clean up.
// FIXME: AbstractVariables.clear();
}
@@ -2455,6 +2459,12 @@ MCDwarfDwoLineTable *DwarfDebug::getDwoLineTable(const DwarfCompileUnit &CU) {
return &SplitTypeUnitFileTable;
}
+void DwarfDebug::emitBTFSection(bool IsLittleEndian) {
+ DwarfFile &Holder = useSplitDwarf() ? SkeletonHolder : InfoHolder;
+
+ Holder.emitBTFSection(IsLittleEndian);
+}
+
uint64_t DwarfDebug::makeTypeSignature(StringRef Identifier) {
MD5 Hash;
Hash.update(Identifier);
OpenPOWER on IntegriCloud