aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/ItaniumCXXABI.cpp
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-05-06 14:01:45 -0700
committerAlon Zakai <alonzakai@gmail.com>2014-05-06 14:01:45 -0700
commit0db5dc3a0df36251eac3ea8ad6bf852acb2f819d (patch)
treeb254238be8ce014a2eaab5f3e7d064379563907a /lib/CodeGen/ItaniumCXXABI.cpp
parent9596f4e867095c9f1741601615a8d2bcb097772e (diff)
parentdc171d8a2090ca1d46be0f164801edf8721ec5cc (diff)
Merge branch 'incoming'1.17.0
Diffstat (limited to 'lib/CodeGen/ItaniumCXXABI.cpp')
-rw-r--r--lib/CodeGen/ItaniumCXXABI.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/lib/CodeGen/ItaniumCXXABI.cpp b/lib/CodeGen/ItaniumCXXABI.cpp
index 3767e4f278..1568284a7d 100644
--- a/lib/CodeGen/ItaniumCXXABI.cpp
+++ b/lib/CodeGen/ItaniumCXXABI.cpp
@@ -231,18 +231,23 @@ CodeGen::CGCXXABI *CodeGen::CreateItaniumCXXABI(CodeGenModule &CGM) {
return new ItaniumCXXABI(CGM, /* UseARMMethodPtrABI = */ true,
/* UseARMGuardVarABI = */ true);
+ case TargetCXXABI::Emscripten:
+ // Use ARM-style method pointers so that generated code
+ // does not assume anything about the alignment of function
+ // pointers.
+ return new ItaniumCXXABI(CGM, /* UseARMMethodPtrABI = */ true,
+ /* UseARMGuardVarABI = */ false);
+
case TargetCXXABI::GenericItanium:
- switch (CGM.getContext().getTargetInfo().getTriple().getArch()) {
- case llvm::Triple::le32:
- case llvm::Triple::asmjs:
- // Use ARM-style method pointers so that generated code
+ if (CGM.getContext().getTargetInfo().getTriple().getArch()
+ == llvm::Triple::le32) {
+ // For PNaCl, use ARM-style method pointers so that PNaCl code
// does not assume anything about the alignment of function
// pointers.
return new ItaniumCXXABI(CGM, /* UseARMMethodPtrABI = */ true,
/* UseARMGuardVarABI = */ false);
- default:
- return new ItaniumCXXABI(CGM);
}
+ return new ItaniumCXXABI(CGM);
case TargetCXXABI::Microsoft:
llvm_unreachable("Microsoft ABI is not Itanium-based");