aboutsummaryrefslogtreecommitdiff
path: root/lib/Support/CommandLine.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-11-14 21:36:07 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-11-14 21:36:07 +0000
commitba43e0785b7449501f019b9aa4433881dd05bb6a (patch)
treed7298b8c9e7cb200a741890904990c30aa3d5ed6 /lib/Support/CommandLine.cpp
parent9c477f54f3c3e2541205f24bfe89b22da7b6e096 (diff)
Report the detected host CPU in --version.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88813 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/CommandLine.cpp')
-rw-r--r--lib/Support/CommandLine.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Support/CommandLine.cpp b/lib/Support/CommandLine.cpp
index 07900d8493..4275b28335 100644
--- a/lib/Support/CommandLine.cpp
+++ b/lib/Support/CommandLine.cpp
@@ -1153,9 +1153,12 @@ public:
#ifndef NDEBUG
OS << " with assertions";
#endif
+ std::string CPU = sys::getHostCPUName();
+ if (CPU.empty()) CPU = "(unknown)";
OS << ".\n"
<< " Built " << __DATE__ << " (" << __TIME__ << ").\n"
<< " Host: " << sys::getHostTriple() << '\n'
+ << " Host CPU: " << CPU << '\n'
<< '\n'
<< " Registered Targets:\n";