Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Add accessors for MCSubtargetInfo CPU and Feature tables

This is needed for `-C target-cpu=help` and `-C target-feature=help` in rustc
  • Loading branch information...
bitshifter authored and alexcrichton committed Jul 10, 2016
1 parent bdeb8b8 commit deaf37e407d6c54e6c8ac60de2a0a4ca47b95c41
Showing with 9 additions and 0 deletions.
  1. +9 −0 include/llvm/MC/MCSubtargetInfo.h
@@ -172,10 +172,19 @@ class MCSubtargetInfo {
return Found != ProcDesc.end() && StringRef(Found->Key) == CPU;
}


/// Returns string representation of scheduler comment
virtual std::string getSchedInfoStr(MCInst const &MCI) const {
return {};
}

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

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

} // end namespace llvm

0 comments on commit deaf37e

Please sign in to comment.
You can’t perform that action at this time.