Merge pull request #85244 from aidan-hall/fixing-debug-info-rebase

Retain more debug info in optimized builds
This commit is contained in:
Aidan Hall
2025-12-01 20:49:40 +00:00
committed by GitHub
13 changed files with 170 additions and 8 deletions

View File

@@ -1554,6 +1554,7 @@ struct BridgedContext {
BRIDGED_INLINE void eraseBlock(BridgedBasicBlock block) const;
static BRIDGED_INLINE void moveInstructionBefore(BridgedInstruction inst, BridgedInstruction beforeInst);
static BRIDGED_INLINE void copyInstructionBefore(BridgedInstruction inst, BridgedInstruction beforeInst);
static BRIDGED_INLINE void salvageDebugInfo(BridgedInstruction inst);
// SSAUpdater

View File

@@ -41,6 +41,7 @@
#include "swift/SIL/SILVTable.h"
#include "swift/SIL/SILWitnessTable.h"
#include "swift/SILOptimizer/Utils/ConstExpr.h"
#include "swift/SILOptimizer/Utils/DebugOptUtils.h"
#include "swift/SIL/SILConstants.h"
#include <stdbool.h>
#include <stddef.h>
@@ -3212,6 +3213,10 @@ void BridgedContext::copyInstructionBefore(BridgedInstruction inst, BridgedInstr
inst.unbridged()->clone(beforeInst.unbridged());
}
void BridgedContext::salvageDebugInfo(BridgedInstruction inst) {
swift::salvageDebugInfo(inst.unbridged());
}
OptionalBridgedFunction BridgedContext::lookupStdlibFunction(BridgedStringRef name) const {
return {context->lookupStdlibFunction(name.unbridged())};
}