[llvm] f58fb8a - [BPF] Fix tests that fail if /tmp/t.c exists
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 25 14:55:57 PST 2022
Author: Reid Kleckner
Date: 2022-02-25T14:55:53-08:00
New Revision: f58fb8ae7fa04e78a0c618c566f0d399d9102a02
URL: https://github.com/llvm/llvm-project/commit/f58fb8ae7fa04e78a0c618c566f0d399d9102a02
DIFF: https://github.com/llvm/llvm-project/commit/f58fb8ae7fa04e78a0c618c566f0d399d9102a02.diff
LOG: [BPF] Fix tests that fail if /tmp/t.c exists
IMO the BPF backend shouldn't read random source files referenced from
debug info. I filed llvm.org/pr54092 about this.
Added:
Modified:
llvm/test/CodeGen/BPF/BTF/func-non-void.ll
llvm/test/CodeGen/BPF/BTF/func-unused-arg.ll
llvm/test/CodeGen/BPF/BTF/func-void.ll
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/BPF/BTF/func-non-void.ll b/llvm/test/CodeGen/BPF/BTF/func-non-void.ll
index 59e9b89a34329..428dfac2e53d5 100644
--- a/llvm/test/CodeGen/BPF/BTF/func-non-void.ll
+++ b/llvm/test/CodeGen/BPF/BTF/func-non-void.ll
@@ -42,7 +42,7 @@ define dso_local i32 @f1(i32 returned) local_unnamed_addr #0 !dbg !7 {
; CHECK-NEXT: .byte 0
; CHECK-NEXT: .ascii ".text" # string offset=11
; CHECK-NEXT: .byte 0
-; CHECK-NEXT: .ascii "/tmp/t.c" # string offset=17
+; CHECK-NEXT: .ascii "/DNE/t.c" # string offset=17
; CHECK-NEXT: .byte 0
; CHECK-NEXT: .section .BTF.ext,"", at progbits
; CHECK-NEXT: .short 60319 # 0xeb9f
@@ -83,7 +83,7 @@ attributes #1 = { nounwind readnone speculatable }
!llvm.ident = !{!6}
!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 8.0.0 (trunk 345562) (llvm/trunk 345560)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, nameTableKind: None)
-!1 = !DIFile(filename: "t.c", directory: "/tmp")
+!1 = !DIFile(filename: "t.c", directory: "/DNE")
!2 = !{}
!3 = !{i32 2, !"Dwarf Version", i32 4}
!4 = !{i32 2, !"Debug Info Version", i32 3}
diff --git a/llvm/test/CodeGen/BPF/BTF/func-unused-arg.ll b/llvm/test/CodeGen/BPF/BTF/func-unused-arg.ll
index 9c31c5423ebd1..95c2f9d4e1c8f 100644
--- a/llvm/test/CodeGen/BPF/BTF/func-unused-arg.ll
+++ b/llvm/test/CodeGen/BPF/BTF/func-unused-arg.ll
@@ -42,7 +42,7 @@ define dso_local i32 @f1(i32) local_unnamed_addr #0 !dbg !7 {
; CHECK-NEXT: .byte 0
; CHECK-NEXT: .ascii ".text" # string offset=11
; CHECK-NEXT: .byte 0
-; CHECK-NEXT: .ascii "/tmp/t.c" # string offset=17
+; CHECK-NEXT: .ascii "/DNE/t.c" # string offset=17
; CHECK-NEXT: .byte 0
; CHECK-NEXT: .section .BTF.ext,"", at progbits
; CHECK-NEXT: .short 60319 # 0xeb9f
@@ -79,7 +79,7 @@ attributes #1 = { nounwind readnone speculatable }
!llvm.ident = !{!6}
!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 8.0.0 (trunk 345562) (llvm/trunk 345560)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, nameTableKind: None)
-!1 = !DIFile(filename: "t.c", directory: "/tmp")
+!1 = !DIFile(filename: "t.c", directory: "/DNE")
!2 = !{}
!3 = !{i32 2, !"Dwarf Version", i32 4}
!4 = !{i32 2, !"Debug Info Version", i32 3}
diff --git a/llvm/test/CodeGen/BPF/BTF/func-void.ll b/llvm/test/CodeGen/BPF/BTF/func-void.ll
index d7b46afb7860d..94770dba455e0 100644
--- a/llvm/test/CodeGen/BPF/BTF/func-void.ll
+++ b/llvm/test/CodeGen/BPF/BTF/func-void.ll
@@ -31,7 +31,7 @@ define dso_local void @f1() local_unnamed_addr #0 !dbg !7 {
; CHECK-NEXT: .byte 0
; CHECK-NEXT: .ascii ".text" # string offset=4
; CHECK-NEXT: .byte 0
-; CHECK-NEXT: .ascii "/tmp/t.c" # string offset=10
+; CHECK-NEXT: .ascii "/DNE/t.c" # string offset=10
; CHECK-NEXT: .byte 0
; CHECK-NEXT: .section .BTF.ext,"", at progbits
; CHECK-NEXT: .short 60319 # 0xeb9f
@@ -64,7 +64,7 @@ attributes #0 = { norecurse nounwind readnone "correctly-rounded-divide-sqrt-fp-
!llvm.ident = !{!6}
!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 8.0.0 (trunk 345562) (llvm/trunk 345560)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, nameTableKind: None)
-!1 = !DIFile(filename: "t.c", directory: "/tmp")
+!1 = !DIFile(filename: "t.c", directory: "/DNE")
!2 = !{}
!3 = !{i32 2, !"Dwarf Version", i32 4}
!4 = !{i32 2, !"Debug Info Version", i32 3}
More information about the llvm-commits
mailing list