================
@@ -687,7 +687,9 @@ static void addKCFIPass(const Triple &TargetTriple, const 
LangOptions &LangOpts,
                         PassBuilder &PB) {
   // If the back-end supports KCFI operand bundle lowering, skip KCFIPass.
   if (TargetTriple.getArch() == llvm::Triple::x86_64 ||
-      TargetTriple.isAArch64(64) || TargetTriple.isRISCV())
+      TargetTriple.isAArch64(64) || TargetTriple.isRISCV() ||
+      TargetTriple.getArch() == llvm::Triple::arm ||
----------------
samitolvanen wrote:

Looks like `Triple::isARM()` already has the exact same check, so this didn't 
actually change the behavior:
```C++
  /// Tests whether the target is ARM (little and big endian).
  bool isARM() const {
    return getArch() == Triple::arm || getArch() == Triple::armeb;
  }
```
Also, Thumb mode can be enabled separately for each function using 
`__attribute__((target("thumb")))`, which means checking the triple here isn't 
sufficient to detect mixed ARM/Thumb code...

https://github.com/llvm/llvm-project/pull/163698
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to