aboutsummaryrefslogtreecommitdiff
path: root/include
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 /include
parent9596f4e867095c9f1741601615a8d2bcb097772e (diff)
parentdc171d8a2090ca1d46be0f164801edf8721ec5cc (diff)
Merge branch 'incoming'1.17.0
Diffstat (limited to 'include')
-rw-r--r--include/clang/Basic/TargetCXXABI.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/include/clang/Basic/TargetCXXABI.h b/include/clang/Basic/TargetCXXABI.h
index c9d28f8774..abdf899f5d 100644
--- a/include/clang/Basic/TargetCXXABI.h
+++ b/include/clang/Basic/TargetCXXABI.h
@@ -71,6 +71,10 @@ public:
/// - guard variables are smaller.
GenericAArch64,
+ /// Emscripten uses the Itanium C++, with the exception that it uses
+ /// ARM-style pointers to member functions.
+ Emscripten,
+
/// The Microsoft ABI is the ABI used by Microsoft Visual Studio (and
/// compatible compilers).
///
@@ -104,6 +108,7 @@ public:
case GenericAArch64:
case GenericItanium:
case GenericARM:
+ case Emscripten:
case iOS:
return true;
@@ -119,6 +124,7 @@ public:
case GenericAArch64:
case GenericItanium:
case GenericARM:
+ case Emscripten:
case iOS:
return false;
@@ -128,6 +134,24 @@ public:
llvm_unreachable("bad ABI kind");
}
+ /// \brief Are pointers to member functions differently aligned?
+ bool arePointersToMemberFunctionsAligned() const {
+ switch (getKind()) {
+ case Emscripten:
+ case GenericARM:
+ case GenericAArch64:
+ // ARM-style pointers to member functions put the discriminator in the
+ // this adjustment, so they don't require functions to have any special
+ // alignment.
+ return false;
+ case GenericItanium:
+ case iOS:
+ case Microsoft:
+ return true;
+ }
+ llvm_unreachable("bad ABI kind");
+ }
+
/// \brief Is the default C++ member function calling convention
/// the same as the default calling convention?
bool isMemberFunctionCCDefault() const {
@@ -187,6 +211,7 @@ public:
case GenericAArch64:
case GenericItanium:
+ case Emscripten:
case iOS: // old iOS compilers did not follow this rule
case Microsoft:
return true;
@@ -233,6 +258,7 @@ public:
case GenericItanium:
case GenericAArch64:
case GenericARM:
+ case Emscripten:
case iOS:
return UseTailPaddingUnlessPOD03;