[llvm-commits] [llvm] r89111 - in /llvm/trunk/lib: Support/CommandLine.cpp System/Host.cpp
Daniel Dunbar
daniel at zuster.org
Sun Nov 22 10:45:48 PST 2009
Hi Benjamin,
I didn't see these failures, can you point me at what was failing? I
would rather the API behave as it is currently documented, and that
clients sort this out, although maybe it isn't worth worrying about.
- Daniel
On Tue, Nov 17, 2009 at 9:57 AM, Benjamin Kramer
<benny.kra at googlemail.com> wrote:
> 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";
> }
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
More information about the llvm-commits
mailing list