[clang] ObjcRuntime.h: Add mips64, aarch64, and riscv64 to non-legacy dispatch (PR #76694)
Hugo Melder via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 1 16:50:02 PST 2024
https://github.com/hmelder created https://github.com/llvm/llvm-project/pull/76694
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
>From 97a9a2753c52d6b377d929a4a6e717ab3c69b68d Mon Sep 17 00:00:00 2001
From: hmelder <service at hugomelder.com>
Date: Tue, 2 Jan 2024 01:46:19 +0100
Subject: [PATCH] Add mips64, aarch64, and riscv64 to ObjcRuntime dispatch
---
clang/include/clang/Basic/ObjCRuntime.h | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
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)) &&
More information about the cfe-commits
mailing list