| 1 | From 0a157fd7a5f61973ffddf96b3d445a718193eb1a Mon Sep 17 00:00:00 2001 |
| 2 | From: Cameron Hart <cameron.hart@gmail.com> |
| 3 | Subject: [PATCH] Add accessors for MCSubtargetInfo CPU and feature tables |
| 4 | |
| 5 | Keep LLVM 17.0.6's getAllProcessorDescriptions alongside the Rust accessors. |
| 6 | |
| 7 | --- a/llvm/include/llvm/MC/MCSubtargetInfo.h |
| 8 | +++ b/llvm/include/llvm/MC/MCSubtargetInfo.h |
| 9 | @@ -234,6 +234,14 @@ |
| 10 | return ProcDesc; |
| 11 | } |
| 12 | |
| 13 | + ArrayRef<SubtargetSubTypeKV> getCPUTable() const { |
| 14 | + return ProcDesc; |
| 15 | + } |
| 16 | + |
| 17 | + ArrayRef<SubtargetFeatureKV> getFeatureTable() const { |
| 18 | + return ProcFeatures; |
| 19 | + } |
| 20 | + |
| 21 | virtual unsigned getHwMode() const { return 0; } |
| 22 | |
| 23 | /// Return the cache size in bytes for the given level of cache. |
| 24 | |