Skip to content

Commit b4bffdb

Browse files
committed
Revert "PR44685: DebugInfo: Handle address-use-invalid type units referencing non-type units"
This reverts commit be3ef93. Test fails on macOS and Windows, e.g. http://45.33.8.238/win/22216/step_11.txt
1 parent e760e85 commit b4bffdb

File tree

4 files changed

+4
-94
lines changed

4 files changed

+4
-94
lines changed

llvm/lib/CodeGen/AsmPrinter/AddressPool.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class AddressPool {
4848

4949
bool hasBeenUsed() const { return HasBeenUsed; }
5050

51-
void resetUsedFlag(bool HasBeenUsed = false) { this->HasBeenUsed = HasBeenUsed; }
51+
void resetUsedFlag() { HasBeenUsed = false; }
5252

5353
MCSymbol *getLabel() { return AddressTableBaseSym; }
5454
void setLabel(MCSymbol *Sym) { AddressTableBaseSym = Sym; }

llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3305,14 +3305,14 @@ void DwarfDebug::addDwarfTypeUnitType(DwarfCompileUnit &CU,
33053305

33063306
DwarfDebug::NonTypeUnitContext::NonTypeUnitContext(DwarfDebug *DD)
33073307
: DD(DD),
3308-
TypeUnitsUnderConstruction(std::move(DD->TypeUnitsUnderConstruction)), AddrPoolUsed(DD->AddrPool.hasBeenUsed()) {
3308+
TypeUnitsUnderConstruction(std::move(DD->TypeUnitsUnderConstruction)) {
33093309
DD->TypeUnitsUnderConstruction.clear();
3310-
DD->AddrPool.resetUsedFlag();
3310+
assert(TypeUnitsUnderConstruction.empty() || !DD->AddrPool.hasBeenUsed());
33113311
}
33123312

33133313
DwarfDebug::NonTypeUnitContext::~NonTypeUnitContext() {
33143314
DD->TypeUnitsUnderConstruction = std::move(TypeUnitsUnderConstruction);
3315-
DD->AddrPool.resetUsedFlag(AddrPoolUsed);
3315+
DD->AddrPool.resetUsedFlag();
33163316
}
33173317

33183318
DwarfDebug::NonTypeUnitContext DwarfDebug::enterNonTypeUnitContext() {

llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,6 @@ class DwarfDebug : public DebugHandlerBase {
648648
class NonTypeUnitContext {
649649
DwarfDebug *DD;
650650
decltype(DwarfDebug::TypeUnitsUnderConstruction) TypeUnitsUnderConstruction;
651-
bool AddrPoolUsed;
652651
friend class DwarfDebug;
653652
NonTypeUnitContext(DwarfDebug *DD);
654653
public:

llvm/test/DebugInfo/X86/addr-tu-to-non-tu.ll

Lines changed: 0 additions & 89 deletions
This file was deleted.

0 commit comments

Comments
 (0)