Skip to content
This repository has been archived by the owner on Feb 5, 2019. It is now read-only.

Commit

Permalink
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 alexcrichton committed Nov 9, 2018
1 parent 52d7ce6 commit 12789b6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions include/llvm/MC/MCSubtargetInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 12789b6

Please sign in to comment.