vinix-ports / llvm17-libs / rust-feature-tables-17.patch
23 lines · 19 sloc · 704 bytes · 8a4086957dd6293071929a854b19ba1eb190198c
Raw
1From 0a157fd7a5f61973ffddf96b3d445a718193eb1a Mon Sep 17 00:00:00 2001
2From: Cameron Hart <cameron.hart@gmail.com>
3Subject: [PATCH] Add accessors for MCSubtargetInfo CPU and feature tables
4
5Keep 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