Skip to content

[BOLT][test] Fix callcont-fallthru.s after #129481 #135867

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bolt/test/X86/callcont-fallthru.s
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# RUN: link_fdata %s %t %t.pa3 PREAGG3
# RUN: link_fdata %s %t %t.pat PREAGGT1
# RUN: link_fdata %s %t %t.pat2 PREAGGT2
# RUN: link_fdata %s %t %t.patplt PREAGGPLT
# RUN: link_fdata %s %t %t.patplt PREAGGPLT --synthetic

## Check normal case: fallthrough is not LP or secondary entry.
# RUN: llvm-strip --strip-unneeded %t -o %t.strip
Expand Down
16 changes: 5 additions & 11 deletions bolt/test/link_fdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
parser.add_argument("--nmtool", default="nm", help="Path to nm tool")
parser.add_argument("--no-lbr", action="store_true")
parser.add_argument("--no-redefine", action="store_true")
parser.add_argument("--synthetic", action="store_true")

args = parser.parse_args()

Expand Down Expand Up @@ -85,17 +86,10 @@
exit("ERROR: unexpected input:\n%s" % line)

# Read nm output: <symbol value> <symbol type> <symbol name>
is_llvm_nm = os.path.basename(args.nmtool) == "llvm-nm"
nm_output = subprocess.run(
[
args.nmtool,
"--defined-only",
"--special-syms" if is_llvm_nm else "--synthetic",
args.objfile,
],
text=True,
capture_output=True,
).stdout
nm_args = [args.nmtool, "--defined-only", args.objfile]
if args.synthetic:
nm_args += ["--synthetic"]
nm_output = subprocess.run(nm_args, text=True, capture_output=True).stdout
# Populate symbol map
symbols = {}
for symline in nm_output.splitlines():
Expand Down