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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | lib/CodeGen/CodeGenModule.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===--- TargetCXXABI.h - C++ ABI Target Configuration ----------*- C++ -*-===// 1 //===--- TargetCXXABI.h - C++ ABI Target Configuration ----------*- C++ -*-===//
2 // 2 //
3 // The LLVM Compiler Infrastructure 3 // The LLVM Compiler Infrastructure
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 /// 9 ///
10 /// \file 10 /// \file
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 case iOS64: 139 case iOS64:
140 case GenericMIPS: 140 case GenericMIPS:
141 return false; 141 return false;
142 142
143 case Microsoft: 143 case Microsoft:
144 return true; 144 return true;
145 } 145 }
146 llvm_unreachable("bad ABI kind"); 146 llvm_unreachable("bad ABI kind");
147 } 147 }
148 148
149 /// \brief Are pointers to member functions differently aligned?
150 bool arePointersToMemberFunctionsAligned() const {
151 switch (getKind()) {
152 case GenericARM:
153 case GenericAArch64:
154 // TODO: ARM-style pointers to member functions put the discriminator in
155 // the this adjustment, so they don't require functions to have any
156 // special alignment and could therefore also return false.
157 case GenericItanium:
158 case GenericMIPS:
159 case iOS:
160 case iOS64:
161 case Microsoft:
162 return true;
163 }
164 llvm_unreachable("bad ABI kind");
165 }
166
149 /// \brief Is the default C++ member function calling convention 167 /// \brief Is the default C++ member function calling convention
150 /// the same as the default calling convention? 168 /// the same as the default calling convention?
151 bool isMemberFunctionCCDefault() const { 169 bool isMemberFunctionCCDefault() const {
152 // Right now, this is always false for Microsoft. 170 // Right now, this is always false for Microsoft.
153 return !isMicrosoft(); 171 return !isMicrosoft();
154 } 172 }
155 173
156 /// Are arguments to a call destroyed left to right in the callee? 174 /// Are arguments to a call destroyed left to right in the callee?
157 /// This is a fundamental language change, since it implies that objects 175 /// This is a fundamental language change, since it implies that objects
158 /// passed by value do *not* live to the end of the full expression. 176 /// passed by value do *not* live to the end of the full expression.
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 } 308 }
291 309
292 friend bool operator!=(const TargetCXXABI &left, const TargetCXXABI &right) { 310 friend bool operator!=(const TargetCXXABI &left, const TargetCXXABI &right) {
293 return !(left == right); 311 return !(left == right);
294 } 312 }
295 }; 313 };
296 314
297 } // end namespace clang 315 } // end namespace clang
298 316
299 #endif 317 #endif
OLDNEW
« 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