Index: lib/Basic/Targets.cpp |
diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp |
index 6135f04b450a8e65d9c2e0c561a0d8bcc640c464..5c0fa423a3d415b48b81b1cfc8e225cbcdc0cf0f 100644 |
--- a/lib/Basic/Targets.cpp |
+++ b/lib/Basic/Targets.cpp |
@@ -6565,6 +6565,19 @@ void PNaClTargetInfo::getGCCRegAliases(const GCCRegAlias *&Aliases, |
NumAliases = 0; |
} |
+// We attempt to use PNaCl (le32) frontend and Mips32EL backend. |
+class NaClMips32ELTargetInfo : public Mips32ELTargetInfo { |
+public: |
+ NaClMips32ELTargetInfo(const llvm::Triple &Triple) : |
+ Mips32ELTargetInfo(Triple) { |
+ MaxAtomicPromoteWidth = MaxAtomicInlineWidth = 0; |
+ } |
+ |
+ BuiltinVaListKind getBuiltinVaListKind() const override { |
+ return TargetInfo::PNaClABIBuiltinVaList; |
+ } |
+}; |
+ |
class Le64TargetInfo : public TargetInfo { |
static const Builtin::Info BuiltinInfo[]; |
@@ -6931,7 +6944,7 @@ static TargetInfo *AllocateTarget(const llvm::Triple &Triple) { |
case llvm::Triple::NetBSD: |
return new NetBSDTargetInfo<Mips32ELTargetInfo>(Triple); |
case llvm::Triple::NaCl: |
- return new NaClTargetInfo<Mips32ELTargetInfo>(Triple); |
+ return new NaClTargetInfo<NaClMips32ELTargetInfo>(Triple); |
default: |
return new Mips32ELTargetInfo(Triple); |
} |