diff options
author | Dan Gohman <sunfish@mozilla.com> | 2014-04-25 15:51:06 -0700 |
---|---|---|
committer | Dan Gohman <sunfish@mozilla.com> | 2014-04-25 15:51:06 -0700 |
commit | ad32fdb927a37dba26cb8b56f3a6b11667fe6584 (patch) | |
tree | bc20982c69cde047d94c9a11b5a50e1d9d6545eb /lib/Basic | |
parent | 926efa5d923dfd9555270a2bbb156bc30ce35fc9 (diff) |
Introduce an Emscripten C++ ABI.
Emscripten uses the Itanium C++ ABI for most things, except that it uses
ARM C++ ABI pointers to member functions, to avoid the overhead of aligning
functions.
Diffstat (limited to 'lib/Basic')
-rw-r--r-- | lib/Basic/Targets.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp index b56b42c798..93da96f897 100644 --- a/lib/Basic/Targets.cpp +++ b/lib/Basic/Targets.cpp @@ -270,6 +270,11 @@ public: // beneficial. this->UserLabelPrefix = ""; this->MaxAtomicPromoteWidth = this->MaxAtomicInlineWidth = 32; + + // Emscripten uses the Itanium ABI mostly, but it uses ARM-style pointers + // to member functions so that it can avoid having to align function + // addresses. + this->TheCXXABI.set(TargetCXXABI::Emscripten); } }; |