summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Windows
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2011-10-15 04:29:36 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2011-10-15 04:29:36 +0000
commitea97a05fc54b38715e9ae87c290e338bfc1725e9 (patch)
tree3bd44d1e1e63713409a1e8e6fbe9cdacff83db8b /llvm/lib/Support/Windows
parentda2611199b8bf6e71a0a0cd59b2b8af3aa8ac744 (diff)
downloadbcm5719-llvm-ea97a05fc54b38715e9ae87c290e338bfc1725e9.tar.gz
bcm5719-llvm-ea97a05fc54b38715e9ae87c290e338bfc1725e9.zip
Revert r142046, "Fix for llvm::sys::getHostTriple on Windows. Instead of relying on the triple"
It extremely breaks builds when optimization is enabled. Twine should not hold temporary objects. By the way, I might feel sad if I saw "i786-" "i1586-" or "iF86-". llvm-svn: 142055
Diffstat (limited to 'llvm/lib/Support/Windows')
-rw-r--r--llvm/lib/Support/Windows/Host.inc40
1 files changed, 4 insertions, 36 deletions
diff --git a/llvm/lib/Support/Windows/Host.inc b/llvm/lib/Support/Windows/Host.inc
index 6d4803f3b8d..733830e82f0 100644
--- a/llvm/lib/Support/Windows/Host.inc
+++ b/llvm/lib/Support/Windows/Host.inc
@@ -12,44 +12,12 @@
//===----------------------------------------------------------------------===//
#include "Windows.h"
-#include "llvm/ADT/Twine.h"
+#include <cstdio>
+#include <string>
using namespace llvm;
std::string sys::getHostTriple() {
- // Get the execution environment, not the native environment.
- SYSTEM_INFO info;
- ::GetSystemInfo(&info);
-
- Twine ret;
- switch (info.wProcessorArchitecture) {
- // If we don't know what the processor architecture is, or it is not one
- // we currently support, then we should fall back on something reasonable.
- case PROCESSOR_ARCHITECTURE_IA64:
- default: return LLVM_HOSTTRIPLE;
-
- case PROCESSOR_ARCHITECTURE_INTEL:
- // We need to figure out what kind of x86 it is (possible values are
- // i386 through i986).
- ret = Twine("i").concat(Twine(info.wProcessorLevel)).concat("86");
- break;
- case PROCESSOR_ARCHITECTURE_AMD64:
- ret = "amd64";
- break;
- case PROCESSOR_ARCHITECTURE_MIPS:
- ret = "mips";
- break;
- case PROCESSOR_ARCHITECTURE_ARM:
- ret = "arm";
- break;
- case PROCESSOR_ARCHITECTURE_PPC:
- ret = "ppc";
- break;
- case PROCESSOR_ARCHITECTURE_ALPHA:
- ret = "alpha";
- break;
- }
-
- // Since we're on Windows, we're always on pc-win32.
- return ret.concat("-pc-win32").str();
+ // FIXME: Adapt to running version.
+ return LLVM_HOSTTRIPLE;
}
OpenPOWER on IntegriCloud