Skip to content

Commit 58c0dbb

Browse files
bitshifterMingcongBai
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 6f55b95 commit 58c0dbb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

llvm/include/llvm/MC/MCSubtargetInfo.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,11 @@ class MCSubtargetInfo {
234234
return ProcDesc;
235235
}
236236

237+
238+
ArrayRef<SubtargetFeatureKV> getFeatureTable() const {
239+
return ProcFeatures;
240+
}
241+
237242
virtual unsigned getHwMode() const { return 0; }
238243

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

0 commit comments

Comments
 (0)