From 12789b6d97974abefcad84949d13d02edd001ca5 Mon Sep 17 00:00:00 2001 From: Cameron Hart Date: Sun, 10 Jul 2016 23:55:53 +1000 Subject: [PATCH] Add accessors for MCSubtargetInfo CPU and Feature tables This is needed for `-C target-cpu=help` and `-C target-feature=help` in rustc --- include/llvm/MC/MCSubtargetInfo.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/llvm/MC/MCSubtargetInfo.h b/include/llvm/MC/MCSubtargetInfo.h index b3ce523d9c0c..91a459f0a9b5 100644 --- a/include/llvm/MC/MCSubtargetInfo.h +++ b/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 getCPUTable() const { + return ProcDesc; + } + + ArrayRef getFeatureTable() const { + return ProcFeatures; + } }; } // end namespace llvm