Skip to content

Commit

Permalink
[rust] Add accessors for MCSubtargetInfo CPU and Feature tables
Browse files Browse the repository at this point in the history
This is needed for `-C target-cpu=help` and `-C target-feature=help` in rustc
  • Loading branch information
bitshifter authored and nikic committed Feb 3, 2021
1 parent 2a57ea2 commit f525115
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions llvm/include/llvm/MC/MCSubtargetInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,14 @@ class MCSubtargetInfo {
return Found != ProcDesc.end() && StringRef(Found->Key) == CPU;
}

ArrayRef<SubtargetSubTypeKV> getCPUTable() const {
return ProcDesc;
}

ArrayRef<SubtargetFeatureKV> getFeatureTable() const {
return ProcFeatures;
}

virtual unsigned getHwMode() const { return 0; }

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

0 comments on commit f525115

Please sign in to comment.