[llvm-commits] [PATCH] [AlignOf] Add AlignedCharArray and refactor AlignedCharArrayUnion
chandlerc at gmail.com
Mon Dec 31 01:49:57 PST 2012
Feel free to commit w/ these fixes; I can comment further in post-commit review.
Comment at: include/llvm/Support/AlignOf.h:184-186
@@ -137,5 +183,5 @@
/// These types may be arrays, structs, or any other types. The goal is to
/// produce a union type containing a character array which, when used, forms
/// storage suitable to placement new any of these types over. Support for more
/// than four types can be added at the cost of more boiler plate.
This comment should be cleaned up... Some of this is my fault.
"The goal is to expose a char array buffer member which can be used as suitable storage for a placement new of any of these types."? Still awkward.
Comment at: unittests/Support/AlignOfTest.cpp:324-325
@@ -323,2 +323,4 @@
+ EXPECT_EQ(4u, (alignOf<AlignedCharArray<4, 1> >()));
Flesh this out with some more alignments & sizes? Especially sizes as that's the new feature.
More information about the llvm-commits