forked from OSchip/llvm-project
[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:
parent
b87b2ecb4b
commit
bacb988735
|
@ -6689,6 +6689,8 @@ public:
|
||||||
initFeatureMap(llvm::StringMap<bool> &Features, DiagnosticsEngine &Diags,
|
initFeatureMap(llvm::StringMap<bool> &Features, DiagnosticsEngine &Diags,
|
||||||
StringRef CPU,
|
StringRef CPU,
|
||||||
const std::vector<std::string> &FeaturesVec) const override {
|
const std::vector<std::string> &FeaturesVec) const override {
|
||||||
|
if (CPU.empty())
|
||||||
|
CPU = getCPU();
|
||||||
if (CPU == "octeon")
|
if (CPU == "octeon")
|
||||||
Features["mips64r2"] = Features["cnmips"] = true;
|
Features["mips64r2"] = Features["cnmips"] = true;
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue