aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Support/Allocator.h
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2010-10-03 15:15:19 +0000
committerDuncan Sands <baldrick@free.fr>2010-10-03 15:15:19 +0000
commit75e2016f02428289e9cfd693a27bcd9a2a5cc00f (patch)
tree4074482c2e594313232b6b0536f24b1719d4a9b6 /include/llvm/Support/Allocator.h
parent8e956f7e3ea78c9ec091b92ce83047f72f794497 (diff)
downloadexternal_llvm-75e2016f02428289e9cfd693a27bcd9a2a5cc00f.zip
external_llvm-75e2016f02428289e9cfd693a27bcd9a2a5cc00f.tar.gz
external_llvm-75e2016f02428289e9cfd693a27bcd9a2a5cc00f.tar.bz2
Remove two uses of the gcc specific 'aligned' attribute. This
is partly because this attribute caused trouble in the past (the SmallVector one had to be changed from aligned to aligned(8) due to causing crashes on i386 for example; in theory the same might be needed in the Allocator case...). But it's mostly because there seems to be no point in special casing gcc here. Using the same implementation for all compilers results in better testing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115462 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/Allocator.h')
-rw-r--r--include/llvm/Support/Allocator.h4
1 files changed, 0 insertions, 4 deletions
diff --git a/include/llvm/Support/Allocator.h b/include/llvm/Support/Allocator.h
index 4a7251f..0b7151a 100644
--- a/include/llvm/Support/Allocator.h
+++ b/include/llvm/Support/Allocator.h
@@ -221,16 +221,12 @@ public:
inline void *operator new(size_t Size, llvm::BumpPtrAllocator &Allocator) {
struct S {
char c;
-#ifdef __GNUC__
- char x __attribute__((aligned));
-#else
union {
double D;
long double LD;
long long L;
void *P;
} x;
-#endif
};
return Allocator.Allocate(Size, std::min((size_t)llvm::NextPowerOf2(Size),
offsetof(S, x)));