aboutsummaryrefslogtreecommitdiff
path: root/lib/Basic/Targets.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-08-21 22:46:04 +0000
committerJohn McCall <rjmccall@apple.com>2010-08-21 22:46:04 +0000
commitee79a4c30e5d1c5285551c9a25b8ec6d45d46aa7 (patch)
tree646cd47265c995749e077b9f2e620436a5007436 /lib/Basic/Targets.cpp
parentff58e3610f4e12094def69eb2d6dcb4330378d8f (diff)
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
Diffstat (limited to 'lib/Basic/Targets.cpp')
-rw-r--r--lib/Basic/Targets.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp
index 9dcb61eca8..cabe50a560 100644
--- a/lib/Basic/Targets.cpp
+++ b/lib/Basic/Targets.cpp
@@ -1585,6 +1585,9 @@ public:
"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 @@ TargetInfo *TargetInfo::CreateTargetInfo(Diagnostic &Diags,
}
// 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;
}