Skip to content

Commit da7c712

Browse files
bitshiftercuviper
authored andcommitted
[rust] Add accessors for MCSubtargetInfo CPU and Feature tables
This is needed for `-C target-cpu=help` and `-C target-feature=help` in rustc
1 parent 329fda3 commit da7c712

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

llvm/include/llvm/MC/MCSubtargetInfo.h

+8
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,14 @@ class MCSubtargetInfo {
229229
return Found != ProcDesc.end() && StringRef(Found->Key) == CPU;
230230
}
231231

232+
ArrayRef<SubtargetSubTypeKV> getCPUTable() const {
233+
return ProcDesc;
234+
}
235+
236+
ArrayRef<SubtargetFeatureKV> getFeatureTable() const {
237+
return ProcFeatures;
238+
}
239+
232240
virtual unsigned getHwMode() const { return 0; }
233241

234242
/// Return the cache size in bytes for the given level of cache.

0 commit comments

Comments
 (0)