[PATCH] D123804: [clang] A Unified LTO Bitcode Frontend

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 11 13:23:54 PDT 2023


MaskRay accepted this revision.
MaskRay added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang/test/CodeGenCXX/unified-cfi-lto.cpp:4
+// RUN: %clang --target=x86_64-scei-ps4 -funified-lto -flto -fsanitize=cfi -fvisibility=hidden -c %s -o %t.o
+// RUN: llvm-dis %t.o
+
----------------
Did you forget `FileCheck`?



================
Comment at: clang/test/Driver/unified-lto.c:10
+// RUN: %clang --target=x86_64-sie-prospero -### %s -funified-lto 2>&1 | FileCheck --check-prefix=NOUNILTO %s
+// NOUNILTO-NOT: -funified-lto
+// NOUNILTO: clang: warning: argument unused during compilation: '-funified-lto'
----------------
If the path of `%s` contains `-funified-lto`, the NOT pattern will fail spuriously. `-funified-lto` may be unique enough to not cause an issue in practice, but other options did cause an issue IIRC. The conventional solution is to use a double quote to make it really unique enough.
In addition, we typically start with `"-cc1"` to indicate that we are testing cc1 command line.


```
// NOUNILTO:     "-cc1"
// NOUNILTO-NOT: "-funified-lto
```


================
Comment at: clang/test/Driver/whole-program-vtables.c:9
 
+// RUN: %clang --target=x86_64-pc-linux-gnu -fwhole-program-vtables -funified-lto -### %s 2>&1 | FileCheck --check-prefix=NO-LTO %s
+// RUN: %clang --target=x86_64-pc-linux-gnu -fwhole-program-vtables -fno-unified-lto -### %s 2>&1 | FileCheck --check-prefix=NO-LTO %s
----------------
Add a comment `/// -funified-lto does not imply -flto, so we still get an error that fwhole-program-vtables has no effect without -flto`


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D123804/new/

https://reviews.llvm.org/D123804



More information about the llvm-commits mailing list