clang  6.0.0svn
TCE.cpp
Go to the documentation of this file.
1 //===--- TCE.cpp - TCE ToolChain Implementations ----------------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #include "TCE.h"
11 #include "CommonArgs.h"
12 
13 using namespace clang::driver;
14 using namespace clang::driver::toolchains;
15 using namespace clang;
16 using namespace llvm::opt;
17 
18 /// TCEToolChain - A tool chain using the llvm bitcode tools to perform
19 /// all subcommands. See http://tce.cs.tut.fi for our peculiar target.
20 /// Currently does not support anything else but compilation.
21 
22 TCEToolChain::TCEToolChain(const Driver &D, const llvm::Triple &Triple,
23  const ArgList &Args)
24  : ToolChain(D, Triple, Args) {
25  // Path mangling to find libexec
26  std::string Path(getDriver().Dir);
27 
28  Path += "/../libexec";
29  getProgramPaths().push_back(Path);
30 }
31 
33 
34 bool TCEToolChain::IsMathErrnoDefault() const { return true; }
35 
36 bool TCEToolChain::isPICDefault() const { return false; }
37 
38 bool TCEToolChain::isPIEDefault() const { return false; }
39 
40 bool TCEToolChain::isPICDefaultForced() const { return false; }
41 
42 TCELEToolChain::TCELEToolChain(const Driver &D, const llvm::Triple& Triple,
43  const ArgList &Args)
44  : TCEToolChain(D, Triple, Args) {
45 }
46 
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:22
path_list & getProgramPaths()
Definition: ToolChain.h:205
bool isPICDefaultForced() const override
Tests whether this toolchain forces its default for PIC, PIE or non-PIC.
Definition: TCE.cpp:40
Driver - Encapsulate logic for constructing compilation processes from a set of gcc-driver-like comma...
Definition: Driver.h:65
TCELEToolChain(const Driver &D, const llvm::Triple &Triple, const llvm::opt::ArgList &Args)
Definition: TCE.cpp:42
const Driver & getDriver() const
Definition: ToolChain.h:167
TCEToolChain - A tool chain using the llvm bitcode tools to perform all subcommands.
Definition: TCE.h:23
bool IsMathErrnoDefault() const override
IsMathErrnoDefault - Does this tool chain use -fmath-errno by default.
Definition: TCE.cpp:34
Dataflow Directional Tag Classes.
bool isPICDefault() const override
Test whether this toolchain defaults to PIC.
Definition: TCE.cpp:36
bool isPIEDefault() const override
Test whether this toolchain defaults to PIE.
Definition: TCE.cpp:38
ToolChain - Access to tools for a single platform.
Definition: ToolChain.h:73