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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89111 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Benjamin Kramer
2009-11-17 17:57:04 +00:00
parent 56a1f806af
commit 110e7bb25c
2 changed files with 4 additions and 4 deletions

View File

@@ -1154,7 +1154,7 @@ public:
OS << " with assertions"; OS << " with assertions";
#endif #endif
std::string CPU = sys::getHostCPUName(); std::string CPU = sys::getHostCPUName();
if (CPU.empty()) CPU = "(unknown)"; if (CPU == "generic") CPU = "(unknown)";
OS << ".\n" OS << ".\n"
<< " Built " << __DATE__ << " (" << __TIME__ << ").\n" << " Built " << __DATE__ << " (" << __TIME__ << ").\n"
<< " Host: " << sys::getHostTriple() << '\n' << " Host: " << sys::getHostTriple() << '\n'

View File

@@ -249,7 +249,7 @@ std::string sys::getHostCPUName() {
} }
default: default:
return ""; return "generic";
} }
} else if (memcmp(text.c, "AuthenticAMD", 12) == 0) { } else if (memcmp(text.c, "AuthenticAMD", 12) == 0) {
// FIXME: this poorly matches the generated SubtargetFeatureKV table. There // FIXME: this poorly matches the generated SubtargetFeatureKV table. There
@@ -289,10 +289,10 @@ std::string sys::getHostCPUName() {
case 16: case 16:
return "amdfam10"; return "amdfam10";
default: default:
return ""; return "generic";
} }
} }
#endif #endif
return ""; return "generic";
} }