[clang] ObjcRuntime.h: Add mips64, aarch64, and riscv64 to non-legacy dispatch (PR #76694)

via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 1 16:50:46 PST 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Hugo Melder (hmelder)

<details>
<summary>Changes</summary>

This PR updates the list of architectures for which libobjc2 has fast-path objc_msgSend implementations.

Related to: https://github.com/gnustep/libobjc2/pull/261

---
Full diff: https://github.com/llvm/llvm-project/pull/76694.diff


1 Files Affected:

- (modified) clang/include/clang/Basic/ObjCRuntime.h (+11-4) 


``````````diff
diff --git a/clang/include/clang/Basic/ObjCRuntime.h b/clang/include/clang/Basic/ObjCRuntime.h
index 500b2462f00773..29392ad0a0f577 100644
--- a/clang/include/clang/Basic/ObjCRuntime.h
+++ b/clang/include/clang/Basic/ObjCRuntime.h
@@ -101,10 +101,17 @@ class ObjCRuntime {
     // The GNUstep runtime uses a newer dispatch method by default from
     // version 1.6 onwards
     if (getKind() == GNUstep && getVersion() >= VersionTuple(1, 6)) {
-      if (Arch == llvm::Triple::arm ||
-          Arch == llvm::Triple::x86 ||
-          Arch == llvm::Triple::x86_64)
-        return false;
+      switch (Arch) {
+        case llvm::Triple::arm:
+        case llvm::Triple::x86:
+        case llvm::Triple::x86_64:
+        case llvm::Triple::aarch64:
+        case llvm::Triple::mips64:
+        case llvm::Triple::riscv64:
+          return false;
+        default:
+          return true;
+      }
     }
     else if ((getKind() ==  MacOSX) && isNonFragile() &&
              (getVersion() >= VersionTuple(10, 0)) &&

``````````

</details>


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


More information about the cfe-commits mailing list