| From a8f170c5611585510033764926b0c40a6901d001 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 e1f0a86141e3..1e529bf4fb31 100644 |
| --- a/llvm/include/llvm/MC/MCSubtargetInfo.h |
| +++ b/llvm/include/llvm/MC/MCSubtargetInfo.h |
| @@ -230,6 +230,14 @@ public: |
| 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. |
| -- |
| 2.37.3.968.ga6b4b080e4-goog |
| |