MaskRay added inline comments.

================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:5852
                                options::OPT_fno_split_machine_functions)) {
-    // This codegen pass is only available on x86-elf targets.
-    if (Triple.isX86() && Triple.isOSBinFormatELF()) {
+    // This codegen pass is only available on x86 and Arm ELF targets.
+    if ((Triple.isX86() || Triple.isAArch64()) && Triple.isOSBinFormatELF()) {
----------------
AArch64.

Arm can mean AArch32 (often written as "ARM").


================
Comment at: clang/test/Driver/fsplit-machine-functions.c:4
 // RUN: %clang -### -target x86_64 -fprofile-use=default.profdata 
-fsplit-machine-functions -fno-split-machine-functions %s -c 2>&1 | FileCheck 
-check-prefix=CHECK-NOOPT %s
+// RUN: %clang -### -target aarch64-unknown-linux 
-fprofile-use=default.profdata -fsplit-machine-functions %s -c 2>&1 | FileCheck 
-check-prefix=CHECK-AARCH64 %s
 // RUN: not %clang -c -target arm-unknown-linux -fsplit-machine-functions %s 
2>&1 | FileCheck -check-prefix=CHECK-TRIPLE %s
----------------
mingmingl wrote:
> nit: would `-target aarch64` be sufficient here? if yes it's more general.
Use `--target=` for new tests. `--target=aarch64` is sufficient and preferred 
for generic ELF features.


================
Comment at: clang/test/Driver/fsplit-machine-functions.c:9
 // CHECK-NOOPT-NOT: "-fsplit-machine-functions"
+// CHECK-AARCH64:   "-fsplit-machine-functions"
 // CHECK-TRIPLE:    error: unsupported option '-fsplit-machine-functions' for 
target
----------------
Just reuse CHECK-OPT


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D157157

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to