clang 8.0.0

MSP430.h
Go to the documentation of this file.
1 //===--- MSP430.h - MSP430-specific Tool Helpers ----------------*- 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 #ifndef LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_MSP430_H
11 #define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_MSP430_H
12
13 #include "Gnu.h"
14 #include "InputInfo.h"
15 #include "clang/Driver/Driver.h"
16 #include "clang/Driver/DriverDiagnostic.h"
17 #include "clang/Driver/Tool.h"
18 #include "clang/Driver/ToolChain.h"
19 #include "llvm/ADT/StringRef.h"
20 #include "llvm/Option/Option.h"
21
22 #include <string>
23 #include <vector>
24
25 namespace clang {
26 namespace driver {
27 namespace toolchains {
28
29 class LLVM_LIBRARY_VISIBILITY MSP430ToolChain : public Generic_ELF {
30 public:
31 MSP430ToolChain(const Driver &D, const llvm::Triple &Triple,
32 const llvm::opt::ArgList &Args);
33 void
34 AddClangSystemIncludeArgs(const llvm::opt::ArgList &DriverArgs,
35 llvm::opt::ArgStringList &CC1Args) const override;
36 void addClangTargetOptions(const llvm::opt::ArgList &DriverArgs,
37 llvm::opt::ArgStringList &CC1Args,
38 Action::OffloadKind) const override;
39
40 protected:
41 Tool *buildLinker() const override;
42
43 private:
44 std::string computeSysRoot() const;
45 };
46
47 } // end namespace toolchains
48
49 namespace tools {
50 namespace msp430 {
51
52 class LLVM_LIBRARY_VISIBILITY Linker : public GnuTool {
53 public:
54 Linker(const ToolChain &TC)
55 : GnuTool("MSP430::Linker", "msp430-elf-ld", TC) {}
56 bool hasIntegratedCPP() const override { return false; }
57 bool isLinkJob() const override { return true; }
58 void ConstructJob(Compilation &C, const JobAction &JA,
59 const InputInfo &Output, const InputInfoList &Inputs,
60 const llvm::opt::ArgList &TCArgs,
61 const char *LinkingOutput) const override;
62 };
63
64 void getMSP430TargetFeatures(const Driver &D, const llvm::opt::ArgList &Args,
65 std::vector<llvm::StringRef> &Features);
66 } // end namespace msp430
67 } // end namespace tools
68 } // end namespace driver
69 } // end namespace clang
70
71 #endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_MSP430_H
clang::driver::tools::msp430::Linker::hasIntegratedCPP
bool hasIntegratedCPP() const override
Definition: MSP430.h:56
Tool.h
clang::driver::JobAction
Definition: Action.h:374
clang::driver::toolchains::MSP430ToolChain
Definition: MSP430.h:29
clang::driver::InputInfo
InputInfo - Wrapper for information about an input source.
Definition: InputInfo.h:23
clang::driver::Driver
Driver - Encapsulate logic for constructing compilation processes from a set of gcc-driver-like comma...
Definition: Driver.h:58
Driver.h
clang::driver::toolchains::Generic_ELF
Definition: Gnu.h:340
clang::driver::tools::msp430::Linker::Linker
Linker(const ToolChain &TC)
Definition: MSP430.h:54
clang::driver::tools::GnuTool
Base class for all GNU tools that provide the same behavior when it comes to response files support...
Definition: Gnu.h:41
ToolChain.h
llvm::SmallVector
Definition: LLVM.h:36
Gnu.h
clang::driver::Action::OffloadKind
OffloadKind
Definition: Action.h:83
clang
Dataflow Directional Tag Classes.
Definition: CFGReachabilityAnalysis.h:22
clang::driver::Tool
Tool - Information on a specific compilation tool.
Definition: Tool.h:34
InputInfo.h
clang::driver::tools::msp430::getMSP430TargetFeatures
void getMSP430TargetFeatures(const Driver &D, const llvm::opt::ArgList &Args, std::vector< llvm::StringRef > &Features)
clang::driver::Compilation
Compilation - A set of tasks to perform for a single driver invocation.
Definition: Compilation.h:46
DriverDiagnostic.h
clang::driver::tools::msp430::Linker
Definition: MSP430.h:52
clang::driver::tools::msp430::Linker::isLinkJob
bool isLinkJob() const override
Definition: MSP430.h:57
clang::driver::ToolChain
ToolChain - Access to tools for a single platform.
Definition: ToolChain.h:89