Skip to content

Commit df4a102

Browse files
authored
Merge pull request #629 from dcci/bowie-birthday-device
[20200108] Cherry-pick fixes for on-device testing.
2 parents 15d75a0 + 42a65e8 commit df4a102

File tree

3 files changed

+34
-5
lines changed

3 files changed

+34
-5
lines changed

lldb/packages/Python/lldbsuite/test/commands/settings/quoting/TestQuoting.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def do_test_args(self, args_in, args_out):
7474

7575
local_outfile = self.getBuildArtifact("output.txt")
7676
if lldb.remote_platform:
77-
remote_outfile = "output.txt" # Relative to platform's PWD
77+
remote_outfile = lldb.remote_platform.GetWorkingDirectory() + "/output.txt"
7878
else:
7979
remote_outfile = local_outfile
8080

llvm/lib/CodeGen/SelectionDAG/FastISel.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1412,9 +1412,9 @@ bool FastISel::selectIntrinsicCall(const IntrinsicInst *II) {
14121412
const Value *V = DI->getValue();
14131413
assert(DI->getVariable()->isValidLocationForIntrinsic(DbgLoc) &&
14141414
"Expected inlined-at fields to agree");
1415-
if (!V) {
1415+
if (!V || isa<UndefValue>(V)) {
14161416
// Currently the optimizer can produce this; insert an undef to
1417-
// help debugging. Probably the optimizer should not do this.
1417+
// help debugging.
14181418
BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DbgLoc, II, false, 0U,
14191419
DI->getVariable(), DI->getExpression());
14201420
} else if (const auto *CI = dyn_cast<ConstantInt>(V)) {
@@ -1442,8 +1442,7 @@ bool FastISel::selectIntrinsicCall(const IntrinsicInst *II) {
14421442
BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DbgLoc, II, IsIndirect, Reg,
14431443
DI->getVariable(), DI->getExpression());
14441444
} else {
1445-
// We can't yet handle anything else here because it would require
1446-
// generating code, thus altering codegen because of debug info.
1445+
// We don't know how to handle other cases, so we drop.
14471446
LLVM_DEBUG(dbgs() << "Dropping debug info for " << *DI << "\n");
14481447
}
14491448
return true;
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
; RUN: llc -O0 -fast-isel=1 -o - -print-after="finalize-isel" %s 2>&1 | FileCheck %s
2+
3+
; Check that we emit a DBG_VALUE for the `@llvm.dbg.value` which has `undef` has first arg.
4+
5+
target triple = "arm64-apple-ios13.4.0"
6+
define void @foo() !dbg !6 {
7+
; CHECK: DBG_VALUE $noreg, $noreg, !"1", !DIExpression()
8+
call void @llvm.dbg.value(metadata i32* undef, metadata !9, metadata !DIExpression()), !dbg !11
9+
ret void, !dbg !12
10+
}
11+
12+
declare void @llvm.dbg.value(metadata, metadata, metadata)
13+
14+
!llvm.dbg.cu = !{!0}
15+
!llvm.debugify = !{!3, !4}
16+
!llvm.module.flags = !{!5}
17+
18+
!0 = distinct !DICompileUnit(language: DW_LANG_C, file: !1, producer: "debugify", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
19+
!1 = !DIFile(filename: "t.ll", directory: "/")
20+
!2 = !{}
21+
!3 = !{i32 2}
22+
!4 = !{i32 1}
23+
!5 = !{i32 2, !"Debug Info Version", i32 3}
24+
!6 = distinct !DISubprogram(name: "foo", linkageName: "foo", scope: null, file: !1, line: 1, type: !7, scopeLine: 1, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !8)
25+
!7 = !DISubroutineType(types: !2)
26+
!8 = !{!9}
27+
!9 = !DILocalVariable(name: "1", scope: !6, file: !1, line: 1, type: !10)
28+
!10 = !DIBasicType(name: "ty64", size: 64, encoding: DW_ATE_unsigned)
29+
!11 = !DILocation(line: 1, column: 1, scope: !6)
30+
!12 = !DILocation(line: 2, column: 1, scope: !6)

0 commit comments

Comments
 (0)