clang  14.0.0git
TCE.cpp
Go to the documentation of this file.
1 //===--- TCE.cpp - TCE ToolChain Implementations ----------------*- 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 #include "TCE.h"
10 #include "CommonArgs.h"
11 
12 using namespace clang::driver;
13 using namespace clang::driver::toolchains;
14 using namespace clang;
15 using namespace llvm::opt;
16 
17 /// TCEToolChain - A tool chain using the llvm bitcode tools to perform
18 /// all subcommands. See http://tce.cs.tut.fi for our peculiar target.
19 /// Currently does not support anything else but compilation.
20 
21 TCEToolChain::TCEToolChain(const Driver &D, const llvm::Triple &Triple,
22  const ArgList &Args)
23  : ToolChain(D, Triple, Args) {
24  // Path mangling to find libexec
25  std::string Path(getDriver().Dir);
26 
27  Path += "/../libexec";
28  getProgramPaths().push_back(Path);
29 }
30 
32 
33 bool TCEToolChain::IsMathErrnoDefault() const { return true; }
34 
35 bool TCEToolChain::isPICDefault() const { return false; }
36 
37 bool TCEToolChain::isPIEDefault() const { return false; }
38 
39 bool TCEToolChain::isPICDefaultForced() const { return false; }
40 
41 TCELEToolChain::TCELEToolChain(const Driver &D, const llvm::Triple& Triple,
42  const ArgList &Args)
43  : TCEToolChain(D, Triple, Args) {
44 }
45 
clang::driver::toolchains
Definition: AIX.h:55
clang::driver::ToolChain::getProgramPaths
path_list & getProgramPaths()
Definition: ToolChain.h:262
clang::driver::toolchains::TCEToolChain::isPICDefaultForced
bool isPICDefaultForced() const override
Tests whether this toolchain forces its default for PIC, PIE or non-PIC.
Definition: TCE.cpp:39
string
string(SUBSTRING ${CMAKE_CURRENT_BINARY_DIR} 0 ${PATH_LIB_START} PATH_HEAD) string(SUBSTRING $
Definition: CMakeLists.txt:22
clang::driver::ToolChain::getDriver
const Driver & getDriver() const
Definition: ToolChain.h:221
clang::driver::toolchains::TCEToolChain::isPIEDefault
bool isPIEDefault() const override
Test whether this toolchain defaults to PIE.
Definition: TCE.cpp:37
clang::driver::toolchains::TCEToolChain::IsMathErrnoDefault
bool IsMathErrnoDefault() const override
IsMathErrnoDefault - Does this tool chain use -fmath-errno by default.
Definition: TCE.cpp:33
clang::driver::toolchains::TCELEToolChain::TCELEToolChain
TCELEToolChain(const Driver &D, const llvm::Triple &Triple, const llvm::opt::ArgList &Args)
Definition: TCE.cpp:41
clang::driver::toolchains::TCEToolChain::TCEToolChain
TCEToolChain(const Driver &D, const llvm::Triple &Triple, const llvm::opt::ArgList &Args)
TCEToolChain - A tool chain using the llvm bitcode tools to perform all subcommands.
Definition: TCE.cpp:21
llvm::opt
Definition: DiagnosticOptions.h:19
clang::driver::toolchains::TCELEToolChain::~TCELEToolChain
~TCELEToolChain() override
Definition: TCE.cpp:46
clang::driver::toolchains::TCEToolChain::isPICDefault
bool isPICDefault() const override
Test whether this toolchain defaults to PIC.
Definition: TCE.cpp:35
clang::driver::toolchains::TCEToolChain
TCEToolChain - A tool chain using the llvm bitcode tools to perform all subcommands.
Definition: TCE.h:22
clang::driver::toolchains::TCEToolChain::~TCEToolChain
~TCEToolChain() override
Definition: TCE.cpp:31
clang::driver::ToolChain
ToolChain - Access to tools for a single platform.
Definition: ToolChain.h:91
CommonArgs.h
clang
Definition: CalledOnceCheck.h:17
clang::driver::Driver
Driver - Encapsulate logic for constructing compilation processes from a set of gcc-driver-like comma...
Definition: Driver.h:59
clang::driver
Definition: Action.h:31
TCE.h