Skip to content

Commit 541460c

Browse files
committed
Address review feedback
1 parent 6a77cff commit 541460c

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

llvm/docs/SourceLevelDebugging.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,10 @@ comma-separated arguments in parentheses, as with a `call`.
208208
#dbg_declare([Value|MDNode], DILocalVariable, DIExpression, DILocation)
209209
210210
This record provides information about a local element (e.g., variable).
211-
The first argument is an SSA value corresponding to a variable address, and is
212-
typically a static alloca in the function entry block. The second argument is a
213-
`local variable <LangRef.html#dilocalvariable>`_ containing a description of
214-
the variable. The third argument is a `complex expression
211+
The first argument is an SSA ``ptr`` value corresponding to a variable address,
212+
and is typically a static alloca in the function entry block. The second
213+
argument is a `local variable <LangRef.html#dilocalvariable>`_ containing a
214+
description of the variable. The third argument is a `complex expression
215215
<LangRef.html#diexpression>`_. The fourth argument is a `source location
216216
<LangRef.html#dilocation>`_. A ``#dbg_declare`` record describes the
217217
*address* of a source variable.

llvm/lib/IR/Verifier.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6671,8 +6671,9 @@ void Verifier::visit(DbgVariableRecord &DVR) {
66716671
if (DVR.isDbgDeclare())
66726672
CheckDI(VAM->getValue()->getType()->isPointerTy(),
66736673
"location of #dbg_declare must be a pointer", &DVR, MD);
6674-
} else if (auto *AL = dyn_cast<DIArgList>(MD))
6674+
} else if (auto *AL = dyn_cast<DIArgList>(MD)) {
66756675
visitDIArgList(*AL, F);
6676+
}
66766677

66776678
CheckDI(isa_and_nonnull<DILocalVariable>(DVR.getRawVariable()),
66786679
"invalid #dbg record variable", &DVR, DVR.getRawVariable());

llvm/test/CodeGen/AArch64/selectiondag-order.ll

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,8 @@ end: ; preds = %body
5353
; AARCH64-CHECK: BB1_1:
5454

5555

56-
define i64 @simulateWithDbgDeclare(<2 x i32> %a) local_unnamed_addr {
56+
define i64 @simulateWithDbgDeclare(<2 x i32> %a, ptr %ptr) local_unnamed_addr {
5757
entry:
58-
%ptr = alloca i32
5958
%rand = tail call i64 @lrand48() #3
6059
tail call void @llvm.dbg.declare(metadata ptr %ptr, metadata !6, metadata !7), !dbg !8
6160
br label %body

llvm/test/CodeGen/X86/selectiondag-order.ll

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,8 @@ end: ; preds = %body
5353
; X86-CHECK: callq lrand48
5454
; X86-CHECK: movq %rax, %rbx
5555

56-
define i64 @simulateWithDbgDeclare(<2 x i32> %a) local_unnamed_addr {
56+
define i64 @simulateWithDbgDeclare(<2 x i32> %a, ptr %ptr) local_unnamed_addr {
5757
entry:
58-
%ptr = alloca i32
5958
%rand = tail call i64 @lrand48() #3
6059
tail call void @llvm.dbg.declare(metadata ptr %ptr, metadata !6, metadata !7), !dbg !8
6160
br label %body

0 commit comments

Comments
 (0)