Skip to content

Commit 29bd054

Browse files
committed
style nits
1 parent 254e88b commit 29bd054

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

clang/lib/CodeGen/CGStmt.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1488,8 +1488,8 @@ CodeGenFunction::EmitCXXForRangeStmt(const CXXForRangeStmt &S,
14881488
// match existing loop stepping behaviour. FIXME: We could have the branch as
14891489
// the backup location for the condition, which would probably be a better
14901490
// experience.
1491-
if (auto *I = dyn_cast<llvm::Instruction>(BoolCondVal))
1492-
addInstToNewSourceAtom(I, nullptr);
1491+
if (auto *CondI = dyn_cast<llvm::Instruction>(BoolCondVal))
1492+
addInstToNewSourceAtom(CondI, nullptr);
14931493
addInstToNewSourceAtom(I, nullptr);
14941494

14951495
if (ExitBlock != LoopExit.getBlock()) {

clang/test/DebugInfo/KeyInstructions/for-range.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
// RUN: %clang_cc1 -gkey-instructions %s -debug-info-kind=line-tables-only -emit-llvm -o - \
1+
// RUN: %clang_cc1 -triple x86_64-linux-gnu -gkey-instructions %s -debug-info-kind=line-tables-only -emit-llvm -o - \
22
// RUN: | FileCheck %s --implicit-check-not atomGroup --implicit-check-not atomRank
33

4-
// Perennial quesiton: should the inc be its own source atom or not
4+
// Perennial question: should the inc be its own source atom or not
55
// (currently it is).
66

77
// FIXME: See do.c and while.c regarding cmp and cond br groups.
88

99
// The stores in the setup (stores to __RANGE1, __BEGIN1, __END1) are all
1010
// marked as Key. Unclear whether that's desirable. Keep for now as that's
11-
// least risky.
11+
// least risky (at worst it introduces an unecessary step while debugging,
12+
// as opposed to potentially losing one we want).
1213

1314
// Check the conditional branch (and the condition) in FOR_COND and
1415
// unconditional branch in FOR_BODY are Key Instructions.

0 commit comments

Comments
 (0)