[PATCH] Fix alignment issues in Clang.
David Majnemer
david.majnemer at gmail.com
Thu Jun 4 23:24:10 PDT 2015
================
Comment at: include/clang/AST/Type.h:3927-3933
@@ -3902,2 +3926,9 @@
};
+// Assert objects tacked on the end of TemplateSpecializationType won't be
+// misaligned
+// static_assert(llvm::AlignOf<TemplateSpecializationType>::Alignment >=
+// llvm::AlignOf<TemplateArgument>::Alignment, "");
+// static_assert(llvm::AlignOf<TemplateArgument>::Alignment >=
+// llvm::AlignOf<QualType>::Alignment, "");
+// ^ Moved after class TemplateArgument, as it is is forward declared here.
----------------
This code is commented out.
================
Comment at: include/clang/AST/Type.h:4276-4280
@@ -4243,2 +4275,7 @@
};
+// Assert objects tacked on the end of DependentTemplateSpecializationType won't
+// be misaligned
+// static_assert(llvm::AlignOf<DependentTemplateSpecializationType>::Alignment
+// >= llvm::AlignOf<TemplateArgument>::Alignment, "");
+// ^ Moved after class TemplateArgument, as it is is forward declared here.
----------------
As is this.
================
Comment at: lib/CodeGen/CGCleanup.cpp:129
@@ -127,1 +128,3 @@
+void EHScopeStack::unallocate(size_t Size) {
+ StartOfData += llvm::RoundUpToAlignment(Size, ScopeStackAlignment);
----------------
`deallocate` sounds more natural to me, what do you think?
http://reviews.llvm.org/D10272
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the cfe-commits
mailing list