[PATCH] D16139: [MIPS] initFeatureMap() to handle empty string argument
Bhushan Attarde via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 13 02:41:17 PST 2016
bhushan created this revision.
bhushan added a reviewer: dsanders.
bhushan added subscribers: cfe-commits, jaydeep, mohit.bhakkad, nitesh.jain, sagar.
bhushan set the repository for this revision to rL LLVM.
Herald added a reviewer: vkalintiris.
This patch sets CPU string to its default value when it is not supplied by caller.
Repository:
rL LLVM
http://reviews.llvm.org/D16139
Files:
lib/Basic/Targets.cpp
Index: lib/Basic/Targets.cpp
===================================================================
--- lib/Basic/Targets.cpp
+++ lib/Basic/Targets.cpp
@@ -6545,6 +6545,8 @@
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16139.44724.patch
Type: text/x-patch
Size: 501 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160113/09155114/attachment.bin>
More information about the cfe-commits
mailing list