Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Unified Diff: include/clang/Basic/TargetCXXABI.h

Issue 1735523006: Readd the C++ ABI alignment handling logic (Closed) Base URL: https://chromium.googlesource.com/a/native_client/pnacl-clang.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | lib/CodeGen/CodeGenModule.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/clang/Basic/TargetCXXABI.h
diff --git a/include/clang/Basic/TargetCXXABI.h b/include/clang/Basic/TargetCXXABI.h
index 42a976b3afdeb420d92cd700c504cada36c3ce85..c0a72cd413385f9bf073ac6e7a51ce4037eeee25 100644
--- a/include/clang/Basic/TargetCXXABI.h
+++ b/include/clang/Basic/TargetCXXABI.h
@@ -146,6 +146,24 @@ public:
llvm_unreachable("bad ABI kind");
}
+ /// \brief Are pointers to member functions differently aligned?
+ bool arePointersToMemberFunctionsAligned() const {
+ switch (getKind()) {
+ case GenericARM:
+ case GenericAArch64:
+ // TODO: ARM-style pointers to member functions put the discriminator in
+ // the this adjustment, so they don't require functions to have any
+ // special alignment and could therefore also return false.
+ case GenericItanium:
+ case GenericMIPS:
+ case iOS:
+ case iOS64:
+ 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 {
« no previous file with comments | « no previous file | lib/CodeGen/CodeGenModule.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698