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

Commit deaf37e

Browse files
bitshifteralexcrichton
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 bdeb8b8 commit deaf37e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Diff for: include/llvm/MC/MCSubtargetInfo.h

+9
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,19 @@ class MCSubtargetInfo {
172172
return Found != ProcDesc.end() && StringRef(Found->Key) == CPU;
173173
}
174174

175+
175176
/// Returns string representation of scheduler comment
176177
virtual std::string getSchedInfoStr(MCInst const &MCI) const {
177178
return {};
178179
}
180+
181+
ArrayRef<SubtargetFeatureKV> getCPUTable() const {
182+
return ProcDesc;
183+
}
184+
185+
ArrayRef<SubtargetFeatureKV> getFeatureTable() const {
186+
return ProcFeatures;
187+
}
179188
};
180189

181190
} // end namespace llvm

0 commit comments

Comments
 (0)