Host.inc revision 360784
1139823Simp//===- llvm/Support/Win32/Host.inc ------------------------------*- C++ -*-===// 21541Srgrimes// 31541Srgrimes// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 41541Srgrimes// See https://llvm.org/LICENSE.txt for license information. 51541Srgrimes// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 61541Srgrimes// 71541Srgrimes//===----------------------------------------------------------------------===// 81541Srgrimes// 91541Srgrimes// This file implements the Win32 Host support. 101541Srgrimes// 111541Srgrimes//===----------------------------------------------------------------------===// 121541Srgrimes 131541Srgrimes#include "llvm/Support/Windows/WindowsSupport.h" 141541Srgrimes#include <cstdio> 151541Srgrimes#include <string> 161541Srgrimes 171541Srgrimesusing namespace llvm; 181541Srgrimes 191541Srgrimesstatic std::string updateTripleOSVersion(std::string Triple) { 201541Srgrimes return Triple; 211541Srgrimes} 221541Srgrimes 231541Srgrimesstd::string sys::getDefaultTargetTriple() { 241541Srgrimes const char *Triple = LLVM_DEFAULT_TARGET_TRIPLE; 251541Srgrimes 261541Srgrimes // Override the default target with an environment variable named by LLVM_TARGET_TRIPLE_ENV. 271541Srgrimes#if defined(LLVM_TARGET_TRIPLE_ENV) 281541Srgrimes if (const char *EnvTriple = std::getenv(LLVM_TARGET_TRIPLE_ENV)) 2975175Syar Triple = EnvTriple; 3050477Speter#endif 3175176Syar 321541Srgrimes return Triple; 331541Srgrimes} 342168Spaul