[llvm-branch-commits] [llvm] DebugInfo: Avoid some MMI::hasDebugInfo checks (PR #100333)
Sergei Barannikov via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Jul 26 01:08:05 PDT 2024
================
@@ -1148,14 +1148,15 @@ sortGlobalExprs(SmallVectorImpl<DwarfCompileUnit::GlobalExpr> &GVEs) {
void DwarfDebug::beginModule(Module *M) {
DebugHandlerBase::beginModule(M);
- if (!Asm || !MMI->hasDebugInfo())
+ if (!Asm)
return;
unsigned NumDebugCUs = std::distance(M->debug_compile_units_begin(),
M->debug_compile_units_end());
+ if (NumDebugCUs == 0)
+ return;
+
assert(NumDebugCUs > 0 && "Asm unexpectedly initialized");
----------------
s-barannikov wrote:
Redundant with the above check.
https://github.com/llvm/llvm-project/pull/100333
More information about the llvm-branch-commits
mailing list