blob: 2068d51f2b9aae67132d65eb83489b22c9d227c4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
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.
|