1 //===--- Contiki.cpp - Contiki 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 "Contiki.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 Contiki::Contiki(const Driver &D, const llvm::Triple &Triple,
19                  const ArgList &Args)
20     : Generic_ELF(D, Triple, Args) {}
21 
22 SanitizerMask Contiki::getSupportedSanitizers() const {
23   const bool IsX86 = getTriple().getArch() == llvm::Triple::x86;
24   SanitizerMask Res = ToolChain::getSupportedSanitizers();
25   if (IsX86)
26     Res |= SanitizerKind::SafeStack;
27   return Res;
28 }
29