[llvm] 323c672 - DebugInfo: Add an assert about cross-unit references in dwo units
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 20 14:53:31 PST 2022
Author: David Blaikie
Date: 2022-02-20T14:53:17-08:00
New Revision: 323c67278987538bf53eec281fe767504450ca33
URL: https://github.com/llvm/llvm-project/commit/323c67278987538bf53eec281fe767504450ca33
DIFF: https://github.com/llvm/llvm-project/commit/323c67278987538bf53eec281fe767504450ca33.diff
LOG: DebugInfo: Add an assert about cross-unit references in dwo units
This is helping me debug some issues with simplified template names
Added:
Modified:
llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
index 5a2bd479f2774..30fff15b4fa9b 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
@@ -380,6 +380,8 @@ void DwarfUnit::addDIEEntry(DIE &Die, dwarf::Attribute Attribute,
CU = getUnitDie().getUnit();
if (!EntryCU)
EntryCU = getUnitDie().getUnit();
+ assert(EntryCU == CU || !DD->useSplitDwarf() || DD->shareAcrossDWOCUs() ||
+ !static_cast<const DwarfUnit*>(CU)->isDwoUnit());
addAttribute(Die, Attribute,
EntryCU == CU ? dwarf::DW_FORM_ref4 : dwarf::DW_FORM_ref_addr,
Entry);
More information about the llvm-commits
mailing list