LLVM  10.0.0
Host.inc
Go to the documentation of this file.
1 //===- llvm/Support/Win32/Host.inc ------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file implements the Win32 Host support.
10 //
11 //===----------------------------------------------------------------------===//
12 
14 #include <cstdio>
15 #include <string>
16 
17 using namespace llvm;
18 
19 static std::string updateTripleOSVersion(std::string Triple) {
20  return Triple;
21 }
22 
23 std::string sys::getDefaultTargetTriple() {
24  const char *Triple = LLVM_DEFAULT_TARGET_TRIPLE;
25 
26  // Override the default target with an environment variable named by LLVM_TARGET_TRIPLE_ENV.
27 #if defined(LLVM_TARGET_TRIPLE_ENV)
28  if (const char *EnvTriple = std::getenv(LLVM_TARGET_TRIPLE_ENV))
29  Triple = EnvTriple;
30 #endif
31 
32  return Triple;
33 }
This class represents lattice values for constants.
Definition: AllocatorList.h:23
std::string getDefaultTargetTriple()
getDefaultTargetTriple() - Return the default target triple the compiler has been configured to produ...
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:43