aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp
diff options
context:
space:
mode:
authorKrzysztof Pszeniczny <krzysztof.pszeniczny@gmail.com>2020-07-01 23:47:30 -0700
committerSriraman Tallam <tmsriram@google.com>2020-07-01 23:53:00 -0700
commite4b3c138deb8b4e7fd6afbf301b85da7e812d505 (patch)
tree23450e4e3f8e13887e4fed23d3cf069c2d4d93c7 /llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp
parentfdbd78333fc6f1deb3037d0961130f05dce059e7 (diff)
downloadllvm-e4b3c138deb8b4e7fd6afbf301b85da7e812d505.zip
llvm-e4b3c138deb8b4e7fd6afbf301b85da7e812d505.tar.gz
llvm-e4b3c138deb8b4e7fd6afbf301b85da7e812d505.tar.bz2
This patch adds basic debug info support with basic block sections.
This patch uses ranges for debug information when a function contains basic block sections rather than using [lowpc, highpc]. This is also the first in a series of patches for debug info and does not contain the support for linker relaxation. That will be done as a follow up patch. Differential Revision: https://reviews.llvm.org/D78851
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp b/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp
index 9f0781d..880791a 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp
@@ -327,3 +327,17 @@ void DebugHandlerBase::endFunction(const MachineFunction *MF) {
LabelsBeforeInsn.clear();
LabelsAfterInsn.clear();
}
+
+void DebugHandlerBase::beginBasicBlock(const MachineBasicBlock &MBB) {
+ if (!MBB.isBeginSection())
+ return;
+
+ PrevLabel = MBB.getSymbol();
+}
+
+void DebugHandlerBase::endBasicBlock(const MachineBasicBlock &MBB) {
+ if (!MBB.isEndSection())
+ return;
+
+ PrevLabel = nullptr;
+}