diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2011-05-02 19:39:53 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2011-05-02 19:39:53 +0000 | 
| commit | 01af97d3b23bded2b2b21af19bbc6e4cce49e5b3 (patch) | |
| tree | 64a10f4c4154739d4a8191d7e1b52ce497f4ebd6 /lib/Driver/ToolChain.cpp | |
| parent | c3b054d250cdca485c71845089c316e10610ebad (diff) | |
Notes
Diffstat (limited to 'lib/Driver/ToolChain.cpp')
| -rw-r--r-- | lib/Driver/ToolChain.cpp | 16 | 
1 files changed, 12 insertions, 4 deletions
diff --git a/lib/Driver/ToolChain.cpp b/lib/Driver/ToolChain.cpp index e305683930cf..d9199154104a 100644 --- a/lib/Driver/ToolChain.cpp +++ b/lib/Driver/ToolChain.cpp @@ -47,7 +47,7 @@ bool ToolChain::HasNativeLLVMSupport() const {    return false;  } -/// getARMTargetCPU - Get the (LLVM) name of the ARM cpu we are targetting. +/// getARMTargetCPU - Get the (LLVM) name of the ARM cpu we are targeting.  //  // FIXME: tblgen this.  static const char *getARMTargetCPU(const ArgList &Args, @@ -101,6 +101,8 @@ static const char *getARMTargetCPU(const ArgList &Args,      return "iwmmxt";    if (MArch == "xscale")      return "xscale"; +  if (MArch == "armv6m" || MArch == "armv6-m") +    return "cortex-m0";    // If all else failed, return the most base CPU LLVM supports.    return "arm7tdmi"; @@ -137,6 +139,12 @@ static const char *getLLVMArchSuffixForARM(llvm::StringRef CPU) {    if (CPU == "cortex-a8" || CPU == "cortex-a9")      return "v7"; +  if (CPU == "cortex-m3") +    return "v7m"; + +  if (CPU == "cortex-m0") +    return "v6m"; +    return "";  } @@ -168,10 +176,10 @@ std::string ToolChain::ComputeLLVMTriple(const ArgList &Args) const {  }  std::string ToolChain::ComputeEffectiveClangTriple(const ArgList &Args) const { -  // Diagnose use of -mmacosx-version-min and -miphoneos-version-min on -  // non-Darwin. +  // Diagnose use of Darwin OS deployment target arguments on non-Darwin.    if (Arg *A = Args.getLastArg(options::OPT_mmacosx_version_min_EQ, -                               options::OPT_miphoneos_version_min_EQ)) +                               options::OPT_miphoneos_version_min_EQ, +                               options::OPT_mios_simulator_version_min_EQ))      getDriver().Diag(clang::diag::err_drv_clang_unsupported)        << A->getAsString(Args);  | 
