diff options
| author | Roman Divacky <rdivacky@FreeBSD.org> | 2010-03-21 10:49:05 +0000 |
|---|---|---|
| committer | Roman Divacky <rdivacky@FreeBSD.org> | 2010-03-21 10:49:05 +0000 |
| commit | 2f12f10af369d468b14617276446166383d692ed (patch) | |
| tree | 2caca31db4facdc95c23930c0c745c8ef0dee97d /include/llvm/ADT/SmallVector.h | |
| parent | c69102774f9739c81ae1285ed9ae62405071c63c (diff) | |
Notes
Diffstat (limited to 'include/llvm/ADT/SmallVector.h')
| -rw-r--r-- | include/llvm/ADT/SmallVector.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/include/llvm/ADT/SmallVector.h b/include/llvm/ADT/SmallVector.h index 89acefd06186..c2afb7e681d1 100644 --- a/include/llvm/ADT/SmallVector.h +++ b/include/llvm/ADT/SmallVector.h @@ -57,17 +57,18 @@ protected: // something else. An array of char would work great, but might not be // aligned sufficiently. Instead, we either use GCC extensions, or some // number of union instances for the space, which guarantee maximal alignment. + struct U { #ifdef __GNUC__ - typedef char U; - U FirstEl __attribute__((aligned)); + char X __attribute__((aligned)); #else - union U { - double D; - long double LD; - long long L; - void *P; - } FirstEl; + union { + double D; + long double LD; + long long L; + void *P; + } X; #endif + } FirstEl; // Space after 'FirstEl' is clobbered, do not add any instance vars after it. protected: |
