mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +00:00
DebugLabelFolder ruthlessly deletes redundant labels. However, sometimes the redundant labels is referenced by debug info somewhere else. This patch provies a way so that dwarf writer can mark labels as used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68813 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -333,7 +333,7 @@ bool DebugLabelFolder::runOnMachineFunction(MachineFunction &MF) {
|
||||
// Iterate through instructions.
|
||||
for (MachineBasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ) {
|
||||
// Is it a label.
|
||||
if (I->isDebugLabel()) {
|
||||
if (I->isDebugLabel() && !MMI->isDbgLabelUsed(I->getOperand(0).getImm())){
|
||||
// The label ID # is always operand #0, an immediate.
|
||||
unsigned NextLabel = I->getOperand(0).getImm();
|
||||
|
||||
|
Reference in New Issue
Block a user