[MIPS] initFeatureMap() to handle empty string argument

SUMMARY:
    This patch sets CPU string to its default value when it is not supplied by caller.
    
    Reviewers: vkalintiris, dsanders
    Subscribers: mohit.bhakkad, sagar, jaydeep, cfe-commits
    Differential Revision: http://reviews.llvm.org/D16139

llvm-svn: 262691
This commit is contained in:
Bhushan D. Attarde 2016-03-04 06:56:29 +00:00
parent b87b2ecb4b
commit bacb988735
1 changed files with 2 additions and 0 deletions

View File

@ -6689,6 +6689,8 @@ public:
initFeatureMap(llvm::StringMap<bool> &Features, DiagnosticsEngine &Diags,
StringRef CPU,
const std::vector<std::string> &FeaturesVec) const override {
if (CPU.empty())
CPU = getCPU();
if (CPU == "octeon")
Features["mips64r2"] = Features["cnmips"] = true;
else