The ARM C++ ABI is sufficiently different from the Itanium C++ ABI that
it deserves its own enumerator.  Obviously the implementations should
closely follow the Itanium ABI except in cases of divergence.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111749 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp
index 9dcb61e..cabe50a 100644
--- a/lib/Basic/Targets.cpp
+++ b/lib/Basic/Targets.cpp
@@ -1585,6 +1585,9 @@
                            "i64:64:64-f32:32:32-f64:64:64-"
                            "v64:64:64-v128:128:128-a0:0:64-n32");
     }
+
+    // ARM targets default to using the ARM C++ ABI.
+    CXXABI = CXXABI_ARM;
   }
   virtual const char *getABI() const { return ABI.c_str(); }
   virtual bool setABI(const std::string &Name) {
@@ -2631,7 +2634,7 @@
   }
 
   // Set the target C++ ABI.
-  if (!Target->setCXXABI(Opts.CXXABI)) {
+  if (!Opts.CXXABI.empty() && !Target->setCXXABI(Opts.CXXABI)) {
     Diags.Report(diag::err_target_unknown_cxxabi) << Opts.CXXABI;
     return 0;
   }