aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/llvm/lib/TargetParser/RISCVTargetParser.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2023-04-17 17:14:23 +0000
committerDimitry Andric <dim@FreeBSD.org>2023-06-22 18:22:20 +0000
commit1ac55f4cb0001fed92329746c730aa9a947c09a5 (patch)
tree78b2d7f739b7a4b29aa297366416bf701b6ebde8 /contrib/llvm-project/llvm/lib/TargetParser/RISCVTargetParser.cpp
parentbdd1243df58e60e85101c09001d9812a789b6bc4 (diff)
parent8a37c71e9d8855c91b9ef296ed389248f960bb52 (diff)
Diffstat (limited to 'contrib/llvm-project/llvm/lib/TargetParser/RISCVTargetParser.cpp')
-rw-r--r--contrib/llvm-project/llvm/lib/TargetParser/RISCVTargetParser.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/contrib/llvm-project/llvm/lib/TargetParser/RISCVTargetParser.cpp b/contrib/llvm-project/llvm/lib/TargetParser/RISCVTargetParser.cpp
index 89cd5c082d72..933a82b7c6cb 100644
--- a/contrib/llvm-project/llvm/lib/TargetParser/RISCVTargetParser.cpp
+++ b/contrib/llvm-project/llvm/lib/TargetParser/RISCVTargetParser.cpp
@@ -14,6 +14,7 @@
#include "llvm/TargetParser/RISCVTargetParser.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringSwitch.h"
+#include "llvm/TargetParser/Triple.h"
namespace llvm {
namespace RISCV {
@@ -100,5 +101,10 @@ bool getCPUFeaturesExceptStdExt(CPUKind Kind,
return true;
}
+bool isX18ReservedByDefault(const Triple &TT) {
+ // X18 is reserved for the ShadowCallStack ABI (even when not enabled).
+ return TT.isOSFuchsia();
+}
+
} // namespace RISCV
} // namespace llvm