Skip to content

Commit 492a81f

Browse files
bitshiftercuviper
authored andcommitted
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 414f32a commit 492a81f

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
@@ -222,6 +222,14 @@ class MCSubtargetInfo {
222222
return Found != ProcDesc.end() && StringRef(Found->Key) == CPU;
223223
}
224224

225+
ArrayRef<SubtargetSubTypeKV> getCPUTable() const {
226+
return ProcDesc;
227+
}
228+
229+
ArrayRef<SubtargetFeatureKV> getFeatureTable() const {
230+
return ProcFeatures;
231+
}
232+
225233
virtual unsigned getHwMode() const { return 0; }
226234

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

0 commit comments

Comments
 (0)