[lld] [NFC][lld-macho] Generate test bodies for icf-safe-thunk tests (PR #111927)

Ellis Hoag via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 21 10:45:21 PDT 2024


================
@@ -1,115 +1,104 @@
+; NOTE: Code has been autogenerated by utils/update_test_body.py
 ; REQUIRES: aarch64
 
-;;; Build the
-; RUN: rm -rf %t; mkdir %t
-; RUN: llc -filetype=obj %s -O3 -o %t/icf-obj-safe-thunks-dwarf.o -enable-machine-outliner=never -mtriple arm64-apple-macos -addrsig
-; RUN: %lld -arch arm64 -lSystem --icf=safe_thunks -dylib -o %t/icf-safe-dwarf.dylib %t/icf-obj-safe-thunks-dwarf.o
+; RUN: rm -rf %t && split-file %s %t
+
+; RUN: llc -filetype=obj %t/a.ll -O3 -o %t/a.o -enable-machine-outliner=never -mtriple arm64-apple-macos -addrsig
+; RUN: %lld -arch arm64 -lSystem --icf=safe_thunks -dylib -o %t/a.dylib %t/a.o
 
 ;;; Check that we generate valid dSYM
-; RUN: dsymutil %t/icf-safe-dwarf.dylib -o %t/icf-safe.dSYM
-; RUN: llvm-dwarfdump --verify %t/icf-safe.dSYM | FileCheck %s --check-prefix=VERIFY-DSYM
+; RUN: dsymutil %t/a.dylib -o %t/a.dSYM
+; RUN: llvm-dwarfdump --verify %t/a.dSYM | FileCheck %s --check-prefix=VERIFY-DSYM
 ; VERIFY-DSYM: No errors.
 
 ;;; Check that we don't generate STABS entries (N_FUN) for ICF'ed function thunks
-; RUN: dsymutil -s %t/icf-safe-dwarf.dylib | FileCheck %s --check-prefix=VERIFY-STABS
+; RUN: dsymutil -s %t/a.dylib | FileCheck %s --check-prefix=VERIFY-STABS
----------------
ellishg wrote:

Oh I didn't have to change the names. I'm just used to using `%t/a.<blah>` for filenames when using `split-file`. This also aligns `icf-safe-thunks.ll` and `icf-safe-thunks-dwarf.ll` closer together.

https://github.com/llvm/llvm-project/pull/111927


More information about the llvm-commits mailing list