aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp
diff options
context:
space:
mode:
authorJameson Nash <vtjnash@gmail.com>2020-10-16 17:22:07 -0400
committerJameson Nash <vtjnash@gmail.com>2020-10-16 17:22:07 -0400
commit4242df14708cb84b3732ba1a22fb77146833340b (patch)
tree634c6f0e10ea3621bb7df6be6cdad0834f02b231 /llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp
parent24b5266892c30e2c9cb6ea28c2631e988a5754b6 (diff)
downloadllvm-4242df14708cb84b3732ba1a22fb77146833340b.zip
llvm-4242df14708cb84b3732ba1a22fb77146833340b.tar.gz
llvm-4242df14708cb84b3732ba1a22fb77146833340b.tar.bz2
Revert "make the AsmPrinterHandler array public"
I messed up one of the tests.
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp b/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp
index ab53540ed..826c507 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp
@@ -91,11 +91,6 @@ DbgVariableLocation::extractFromMachineInstruction(
DebugHandlerBase::DebugHandlerBase(AsmPrinter *A) : Asm(A), MMI(Asm->MMI) {}
-void DebugHandlerBase::beginModule(Module *M) {
- if (M->debug_compile_units().empty())
- Asm = nullptr;
-}
-
// Each LexicalScope has first instruction and last instruction to mark
// beginning and end of a scope respectively. Create an inverse map that list
// scopes starts (and ends) with an instruction. One instruction may start (or
@@ -281,7 +276,7 @@ void DebugHandlerBase::beginFunction(const MachineFunction *MF) {
}
void DebugHandlerBase::beginInstruction(const MachineInstr *MI) {
- if (!Asm || !MMI->hasDebugInfo())
+ if (!MMI->hasDebugInfo())
return;
assert(CurMI == nullptr);
@@ -307,7 +302,7 @@ void DebugHandlerBase::beginInstruction(const MachineInstr *MI) {
}
void DebugHandlerBase::endInstruction() {
- if (!Asm || !MMI->hasDebugInfo())
+ if (!MMI->hasDebugInfo())
return;
assert(CurMI != nullptr);
@@ -339,7 +334,7 @@ void DebugHandlerBase::endInstruction() {
}
void DebugHandlerBase::endFunction(const MachineFunction *MF) {
- if (Asm && hasDebugInfo(MMI, MF))
+ if (hasDebugInfo(MMI, MF))
endFunctionImpl(MF);
DbgValues.clear();
DbgLabels.clear();