forked from llvm-mirror/llvm
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[llvm-objdump] Add warning messages if disassembly + source for probl…
…ematic inputs Summary: Addresses https://bugs.llvm.org/show_bug.cgi?id=41905 Reviewers: jhenderson, rupprecht, grimar Reviewed By: jhenderson, grimar Subscribers: RKSimon, MaskRay, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D62462 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368963 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information
Michael Pozulp
committed
Aug 15, 2019
1 parent
808e1a5
commit 23c8a3b
Showing
10 changed files
with
81 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 4 additions & 2 deletions
6
test/tools/llvm-objdump/X86/source-interleave-missing-source.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,17 @@ | ||
## Test that if the source cannot be found that disassembly is still printed, | ||
## and that no source is printed. | ||
## that no source is printed, and that we emit a warning. | ||
|
||
# RUN: sed -e "s,SRC_COMPDIR,%/t,g" %p/Inputs/source-interleave.ll > %t.ll | ||
# RUN: sed -e "s,SRC_COMPDIR,%/p/Inputs,g" %p/Inputs/source-interleave.ll > %t2.ll | ||
|
||
# RUN: llc -o %t.o -filetype=obj -mtriple=x86_64-pc-linux %t.ll | ||
# RUN: llc -o %t2.o -filetype=obj -mtriple=x86_64-pc-linux %t2.ll | ||
|
||
# RUN: llvm-objdump --source %t.o | FileCheck %s --implicit-check-not='main()' | ||
# RUN: llvm-objdump --source %t.o 2> %t.e | FileCheck %s --check-prefixes=CHECK --implicit-check-not='main()' | ||
# RUN: llvm-objdump --source %t2.o | FileCheck %s --check-prefixes=CHECK,SOURCE | ||
# RUN: FileCheck %s --input-file %t.e --check-prefixes=WARN | ||
|
||
# WARN: warning: failed to find source {{.*}}source-interleave-x86_64.c | ||
# CHECK: 0000000000000010 main: | ||
# SOURCE-NEXT: ; int main() { | ||
# CHECK-NEXT: 10: 55 pushq %rbp |
6 changes: 4 additions & 2 deletions
6
test/tools/llvm-objdump/X86/source-interleave-no-debug-info.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
## Test that if an object has no debug information, only the disassembly is | ||
## printed when --source is specified. | ||
## printed when --source is specified, and that we emit a warning. | ||
|
||
# RUN: sed -e "s,SRC_COMPDIR,%/p/Inputs,g" %p/Inputs/source-interleave.ll > %t.ll | ||
# RUN: llc -o %t.o -filetype=obj -mtriple=x86_64-pc-linux %t.ll | ||
# RUN: llvm-objcopy --strip-debug %t.o %t2.o | ||
|
||
# RUN: llvm-objdump --source %t.o | FileCheck %s --check-prefixes=CHECK,SOURCE | ||
# RUN: llvm-objdump --source %t2.o | FileCheck %s --implicit-check-not='main()' | ||
# RUN: llvm-objdump --source %t2.o 2> %t2.e | FileCheck %s --check-prefixes=CHECK --implicit-check-not='main()' | ||
# RUN: FileCheck %s --input-file %t2.e --check-prefixes=WARN | ||
|
||
# WARN: warning: failed to parse debug information for {{.*}}2.o | ||
# CHECK: 0000000000000010 main: | ||
# SOURCE-NEXT: ; int main() { | ||
# CHECK-NEXT: 10: 55 pushq %rbp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters