[llvm-commits] [llvm] r89111 - in /llvm/trunk/lib: Support/CommandLine.cpp System/Host.cpp
Benjamin Kramer
benny.kra at googlemail.com
Tue Nov 17 09:57:04 PST 2009
Author: d0k
Date: Tue Nov 17 11:57:04 2009
New Revision: 89111
URL: http://llvm.org/viewvc/llvm-project?rev=89111&view=rev
Log:
Revert CPU detection code to return "generic" instead of an empty string in case
of failure. The x86 target didn't like empty cpu names and broke x86 tests on
non-x86 buildbots.
Modified:
llvm/trunk/lib/Support/CommandLine.cpp
llvm/trunk/lib/System/Host.cpp
Modified: llvm/trunk/lib/Support/CommandLine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/CommandLine.cpp?rev=89111&r1=89110&r2=89111&view=diff
==============================================================================
--- llvm/trunk/lib/Support/CommandLine.cpp (original)
+++ llvm/trunk/lib/Support/CommandLine.cpp Tue Nov 17 11:57:04 2009
@@ -1154,7 +1154,7 @@
OS << " with assertions";
#endif
std::string CPU = sys::getHostCPUName();
- if (CPU.empty()) CPU = "(unknown)";
+ if (CPU == "generic") CPU = "(unknown)";
OS << ".\n"
<< " Built " << __DATE__ << " (" << __TIME__ << ").\n"
<< " Host: " << sys::getHostTriple() << '\n'
Modified: llvm/trunk/lib/System/Host.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/System/Host.cpp?rev=89111&r1=89110&r2=89111&view=diff
==============================================================================
--- llvm/trunk/lib/System/Host.cpp (original)
+++ llvm/trunk/lib/System/Host.cpp Tue Nov 17 11:57:04 2009
@@ -249,7 +249,7 @@
}
default:
- return "";
+ return "generic";
}
} else if (memcmp(text.c, "AuthenticAMD", 12) == 0) {
// FIXME: this poorly matches the generated SubtargetFeatureKV table. There
@@ -289,10 +289,10 @@
case 16:
return "amdfam10";
default:
- return "";
+ return "generic";
}
}
#endif
- return "";
+ return "generic";
}
More information about the llvm-commits
mailing list