diff options
Diffstat (limited to 'clang/lib/Driver/ToolChains.cpp')
-rw-r--r-- | clang/lib/Driver/ToolChains.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/clang/lib/Driver/ToolChains.cpp b/clang/lib/Driver/ToolChains.cpp index 54f8c422946..7b6e2082bcc 100644 --- a/clang/lib/Driver/ToolChains.cpp +++ b/clang/lib/Driver/ToolChains.cpp @@ -713,11 +713,11 @@ DerivedArgList *Darwin::TranslateArgs(const DerivedArgList &Args, if (A->getOption().matches(options::OPT_Xarch__)) { // Skip this argument unless the architecture matches either the toolchain // triple arch, or the arch being bound. - // - // FIXME: Canonicalize name. - StringRef XarchArch = A->getValue(Args, 0); - if (!(XarchArch == getArchName() || - (BoundArch && XarchArch == BoundArch))) + llvm::Triple::ArchType XarchArch = + llvm::Triple::getArchTypeForDarwinArchName(A->getValue(Args, 0)); + if (!(XarchArch == getArch() || + (BoundArch && XarchArch == + llvm::Triple::getArchTypeForDarwinArchName(BoundArch)))) continue; Arg *OriginalArg = A; @@ -975,14 +975,14 @@ const char *Darwin::GetDefaultRelocationModel() const { } const char *Darwin::GetForcedPicModel() const { - if (getArchName() == "x86_64") + if (getArch() == llvm::Triple::x86_64) return "pic"; return 0; } bool Darwin::SupportsProfiling() const { // Profiling instrumentation is only supported on x86. - return getArchName() == "i386" || getArchName() == "x86_64"; + return getArch() == llvm::Triple::x86 || getArch() == llvm::Triple::x86_64; } bool Darwin::SupportsObjCGC() const { |