Commit 3ebecc3d authored by thakis's avatar thakis Committed by Commit bot

win: Remove __alignof workaround, no longer needed.

No intended behavior change.

BUG=none

Review URL: https://codereview.chromium.org/1071513003

Cr-Commit-Position: refs/heads/master@{#324272}
parent e9047088
...@@ -128,13 +128,11 @@ ...@@ -128,13 +128,11 @@
#define ALIGNAS(byte_alignment) __attribute__((aligned(byte_alignment))) #define ALIGNAS(byte_alignment) __attribute__((aligned(byte_alignment)))
#endif #endif
// Return the byte alignment of the given type (available at compile time). Use // Return the byte alignment of the given type (available at compile time).
// sizeof(type) prior to checking __alignof to workaround Visual C++ bug:
// http://goo.gl/isH0C
// Use like: // Use like:
// ALIGNOF(int32) // this would be 4 // ALIGNOF(int32) // this would be 4
#if defined(COMPILER_MSVC) #if defined(COMPILER_MSVC)
#define ALIGNOF(type) (sizeof(type) - sizeof(type) + __alignof(type)) #define ALIGNOF(type) __alignof(type)
#elif defined(COMPILER_GCC) #elif defined(COMPILER_GCC)
#define ALIGNOF(type) __alignof__(type) #define ALIGNOF(type) __alignof__(type)
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment