Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3025)

Unified Diff: base/compiler_specific.h

Issue 2932053002: Use C++11 alignment primitives (Closed)
Patch Set: Format Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: base/compiler_specific.h
diff --git a/base/compiler_specific.h b/base/compiler_specific.h
index 34b0c2d7a2913f98c9b7faa10cc5ab7d7640b4c0..48b0139c659e4aa4aa78015dedac72a48bc972ff 100644
--- a/base/compiler_specific.h
+++ b/base/compiler_specific.h
@@ -107,25 +107,6 @@
#define ALWAYS_INLINE inline
#endif
-// Specify memory alignment for structs, classes, etc.
-// Use like:
-// class ALIGNAS(16) MyClass { ... }
-// ALIGNAS(16) int array[4];
-#if defined(COMPILER_MSVC)
-#define ALIGNAS(byte_alignment) __declspec(align(byte_alignment))
-#elif defined(COMPILER_GCC)
-#define ALIGNAS(byte_alignment) __attribute__((aligned(byte_alignment)))
-#endif
-
-// Return the byte alignment of the given type (available at compile time).
-// Use like:
-// ALIGNOF(int32_t) // this would be 4
-#if defined(COMPILER_MSVC)
-#define ALIGNOF(type) __alignof(type)
-#elif defined(COMPILER_GCC)
-#define ALIGNOF(type) __alignof__(type)
-#endif
-
// Annotate a function indicating the caller must examine the return value.
// Use like:
// int foo() WARN_UNUSED_RESULT;
« no previous file with comments | « no previous file | base/containers/stack_container.h » ('j') | third_party/crashpad/crashpad/minidump/minidump_extensions.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698