clang  16.0.0git
Contiki.cpp
Go to the documentation of this file.
1 //===--- Contiki.cpp - Contiki 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 "Contiki.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 Contiki::Contiki(const Driver &D, const llvm::Triple &Triple,
18  const ArgList &Args)
19  : Generic_ELF(D, Triple, Args) {}
20 
22  const bool IsX86 = getTriple().getArch() == llvm::Triple::x86;
24  if (IsX86)
25  Res |= SanitizerKind::SafeStack;
26  return Res;
27 }
clang::driver::toolchains
Definition: AIX.h:55
clang::driver::toolchains::Generic_ELF
Definition: Gnu.h:363
clang::driver::toolchains::Contiki::getSupportedSanitizers
SanitizerMask getSupportedSanitizers() const override
Return sanitizers which are available in this toolchain.
Definition: Contiki.cpp:21
llvm::opt
Definition: DiagnosticOptions.h:19
clang::driver::ToolChain::getTriple
const llvm::Triple & getTriple() const
Definition: ToolChain.h:234
Contiki.h
clang::driver::ToolChain::getSupportedSanitizers
virtual SanitizerMask getSupportedSanitizers() const
Return sanitizers which are available in this toolchain.
Definition: ToolChain.cpp:1082
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:75
clang::driver::toolchains::Contiki::Contiki
Contiki(const Driver &D, const llvm::Triple &Triple, const llvm::opt::ArgList &Args)
Definition: Contiki.cpp:17
clang::driver
Definition: Action.h:31
clang::SanitizerMask
Definition: Sanitizers.h:30