Skip to content

Commit 5ed1ded

Browse files
committed
[KeyInstr][Clang][NFC] Don't set -dwarf-use-key-instructions
Once #144104 lands the flag is true by default (because each DISubprogram will track whether or not it's using key instructions).
1 parent 7354123 commit 5ed1ded

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4631,11 +4631,8 @@ renderDebugOptions(const ToolChain &TC, const Driver &D, const llvm::Triple &T,
46314631
}
46324632

46334633
if (Args.hasFlag(options::OPT_gkey_instructions,
4634-
options::OPT_gno_key_instructions, false)) {
4634+
options::OPT_gno_key_instructions, false))
46354635
CmdArgs.push_back("-gkey-instructions");
4636-
CmdArgs.push_back("-mllvm");
4637-
CmdArgs.push_back("-dwarf-use-key-instructions");
4638-
}
46394636

46404637
if (EmitCodeView) {
46414638
CmdArgs.push_back("-gcodeview");

clang/test/DebugInfo/KeyInstructions/flag.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,14 @@
88
// HELP-NOT: key-instructions
99

1010
// KEY-INSTRUCTIONS: "-gkey-instructions"
11-
// KEY-INSTRUCTIONS: "-mllvm" "-dwarf-use-key-instructions"
1211

1312
// NO-KEY-INSTRUCTIONS-NOT: key-instructions
1413

15-
//// TODO: Add smoke test once some functionality has been added.
14+
// RUN %clang %s | FileCheck %s --check-prefix=SMOKETEST-OFF
15+
void f() {}
16+
// SMOKETEST-OFF-NOT: keyInstructions
17+
// SMOKETEST-OFF-NOT: atomGroup
18+
19+
// RUN %clang %s -gkey-instructions | FileCheck %s --check-prefix=SMOKETEST-ON
20+
// SMOKETEST-ON: keyInstructions: true
21+
// SMOKETEST-ON: atomGroup: 1

0 commit comments

Comments
 (0)