aports/main/llvm17/rust-feature-tables.patch
Natanael Copa da65c809d9 main/llvm17: add llvm17
Add patch from upstream PR for Hexagon tests
ref: https://github.com/llvm/llvm-project/pull/66785

Revert commit that makes x86_64 test fail
ref: https://github.com/llvm/llvm-project/issues/66776

Add workaround for miscompile(?) on armv 32 bit.
https://github.com/llvm/llvm-project/issues/62195
2023-10-20 13:12:07 +00:00

31 lines
1.1 KiB
Diff

Patch-Source: https://github.com/rust-lang/llvm-project/commit/0a157fd7a5f61973ffddf96b3d445a718193eb1a
From 0a157fd7a5f61973ffddf96b3d445a718193eb1a Mon Sep 17 00:00:00 2001
From: Cameron Hart <cameron.hart@gmail.com>
Date: Sun, 10 Jul 2016 23:55:53 +1000
Subject: [PATCH] [rust] Add accessors for MCSubtargetInfo CPU and Feature
tables
This is needed for `-C target-cpu=help` and `-C target-feature=help` in rustc
---
llvm/include/llvm/MC/MCSubtargetInfo.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/llvm/include/llvm/MC/MCSubtargetInfo.h b/llvm/include/llvm/MC/MCSubtargetInfo.h
index e1f0a86141e36..1e529bf4fb31e 100644
--- a/llvm/include/llvm/MC/MCSubtargetInfo.h
+++ b/llvm/include/llvm/MC/MCSubtargetInfo.h
@@ -230,6 +230,14 @@ class MCSubtargetInfo {
return Found != ProcDesc.end() && StringRef(Found->Key) == CPU;
}
+ ArrayRef<SubtargetSubTypeKV> getCPUTable() const {
+ return ProcDesc;
+ }
+
+ ArrayRef<SubtargetFeatureKV> getFeatureTable() const {
+ return ProcFeatures;
+ }
+
virtual unsigned getHwMode() const { return 0; }
/// Return the cache size in bytes for the given level of cache.