From: Daniel Sanders Date: Thu, 20 Feb 2014 14:58:19 +0000 (+0000) Subject: [mips] Make it impossible to have UnknownABI in CodeGen and Integrated Assembler. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3734ce4c7eaad52dc5598147d1d9a58132c28471;p=clang [mips] Make it impossible to have UnknownABI in CodeGen and Integrated Assembler. Summary: This removes the need to coerce UnknownABI to the default ABI (O32 for MIPS32, N64 for MIPS64 [*]) in both MipsSubtarget and MipsAsmParser. Clang has been updated to disable both possible default ABI's before enabling the ABI it intends to use. [*] N64 being the default for MIPS64 is not actually correct. However N32 is not fully implemented/tested yet. Depends on: D2830 Reviewers: jacksprat, matheusalmeida Reviewed By: matheusalmeida Differential Revision: http://llvm-reviews.chandlerc.com/D2832 Differential Revision: http://llvm-reviews.chandlerc.com/D2846 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201792 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp index 8c67f54d62..c7f71938df 100644 --- a/lib/Basic/Targets.cpp +++ b/lib/Basic/Targets.cpp @@ -4905,6 +4905,13 @@ public: return true; } void getDefaultFeatures(llvm::StringMap &Features) const { + // The backend enables certain ABI's by default according to the + // architecture. + // Disable both possible defaults so that we don't end up with multiple + // ABI's selected and trigger an assertion. + Features["o32"] = false; + Features["n64"] = false; + Features[ABI] = true; Features[CPU] = true; }