summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic/Targets.cpp
diff options
context:
space:
mode:
authorCharles Davis <cdavis@mines.edu>2010-06-11 01:06:47 +0000
committerCharles Davis <cdavis@mines.edu>2010-06-11 01:06:47 +0000
commit95a546ee4dbdc997e9898c9839f3851f46a78b5c (patch)
tree1831268fb0626735bb78b6ece5649b3549d444b8 /clang/lib/Basic/Targets.cpp
parent437416c06bc1520baff737c56784480ed964d687 (diff)
downloadbcm5719-llvm-95a546ee4dbdc997e9898c9839f3851f46a78b5c.tar.gz
bcm5719-llvm-95a546ee4dbdc997e9898c9839f3851f46a78b5c.zip
Add an option to specify the target C++ ABI to the frontend. Use it to
select either the default Itanium ABI or the new, experimental Microsoft ABI. llvm-svn: 105804
Diffstat (limited to 'clang/lib/Basic/Targets.cpp')
-rw-r--r--clang/lib/Basic/Targets.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Basic/Targets.cpp b/clang/lib/Basic/Targets.cpp
index fb58739896a..3717b12b15d 100644
--- a/clang/lib/Basic/Targets.cpp
+++ b/clang/lib/Basic/Targets.cpp
@@ -2475,6 +2475,12 @@ TargetInfo *TargetInfo::CreateTargetInfo(Diagnostic &Diags,
return 0;
}
+ // Set the target C++ ABI.
+ if (!Target->setCXXABI(Opts.CXXABI)) {
+ Diags.Report(diag::err_target_unknown_cxxabi) << Opts.CXXABI;
+ return 0;
+ }
+
// Compute the default target features, we need the target to handle this
// because features may have dependencies on one another.
llvm::StringMap<bool> Features;
OpenPOWER on IntegriCloud