Skip to content

Commit 707b6f7

Browse files
committed
[DebugInfo] Soft-disable the production of debug intrinsics
This patch switches the --experimental-debuginfo-iterators flag to be stored to an otherwise unused cl-opt. This is a deliberate attempt to break downstream tests that are relying on the use of debug intrinsics, because they're imminently going away! If this commit breaks your tests, please just revert the commit upstream, and then make contact with us here: https://discourse.llvm.org/t/psa-ir-output-changing-from-debug-intrinsics-to-debug-records/79578 So that we can work out whether there's any further transition work needed to support the move away from using debug intrinsics.
1 parent 1aed6ad commit 707b6f7

File tree

1 file changed

+21
-4
lines changed

1 file changed

+21
-4
lines changed

llvm/lib/IR/BasicBlock.cpp

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,28 @@ using namespace llvm;
3030
#define DEBUG_TYPE "ir"
3131
STATISTIC(NumInstrRenumberings, "Number of renumberings across all blocks");
3232

33+
// This cl-opt exists to control whether variable-location information is
34+
// produced using intrinsics, or whether DbgRecords are produced. However,
35+
// it's imminently being phased out, so give it a flag-name that is very
36+
// unlikely to be used anywhere.
37+
//
38+
// If you find yourself needing to use this flag for any period longer than
39+
// five minutes, please revert the patch making this change, and make contact
40+
// in this discourse post, where we can discuss any further transition work
41+
// that might be needed to remove debug intrinsics.
42+
//
43+
// https://discourse.llvm.org/t/psa-ir-output-changing-from-debug-intrinsics-to-debug-records/79578
3344
cl::opt<bool> UseNewDbgInfoFormat(
34-
"experimental-debuginfo-iterators",
35-
cl::desc("Enable communicating debuginfo positions through iterators, "
36-
"eliminating intrinsics. Has no effect if "
37-
"--preserve-input-debuginfo-format=true."),
45+
"dont-pass-this-flag-please-experimental-debuginfo", cl::Hidden,
46+
cl::init(true));
47+
48+
// This cl-opt collects the --experimental-debuginfo-iterators flag and then
49+
// does nothing with it (because the it gets stored into an otherwise unused
50+
// cl-opt), so that we can disable debug-intrinsic production without
51+
// immediately modifying lots of tests. If your tests break because of this
52+
// change, please see the next comment up.
53+
static cl::opt<bool> DeliberatelyUnseenDbgInfoFlag(
54+
"experimental-debuginfo-iterators", cl::Hidden,
3855
cl::init(true));
3956

4057
DbgMarker *BasicBlock::createMarker(Instruction *I) {

0 commit comments

Comments
 (0)