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

Unified Diff: base/lazy_instance_unittest.cc

Issue 2670873002: Remove base's ALIGNOF/ALIGNAS in favor of alignof/alignas. (Closed)
Patch Set: #if / #endif all the things Created 3 years, 10 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/lazy_instance_unittest.cc
diff --git a/base/lazy_instance_unittest.cc b/base/lazy_instance_unittest.cc
index 8947b1291f60d54112fba0f13c72c86c9b29961a..e9d83fddb1e17b445de99d9d5bbc678f4edf610e 100644
--- a/base/lazy_instance_unittest.cc
+++ b/base/lazy_instance_unittest.cc
@@ -166,9 +166,15 @@ TEST(LazyInstanceTest, Alignment) {
// ensure proper alignment of the static data.
static LazyInstance<AlignedData<4> > align4 = LAZY_INSTANCE_INITIALIZER;
static LazyInstance<AlignedData<32> > align32 = LAZY_INSTANCE_INITIALIZER;
+// GCC doesn't like alignment >64 on ARM.
danakj 2017/02/08 21:29:47 Honest question is it worth testing this if nothin
dcheng 2017/02/09 00:01:24 I don't feel strongly about this; I'm happy to jus
+#if !defined(ARCH_CPU_ARM_FAMILY) || defined(__clang__)
static LazyInstance<AlignedData<4096> > align4096 = LAZY_INSTANCE_INITIALIZER;
+#endif
EXPECT_ALIGNED(align4.Pointer(), 4);
EXPECT_ALIGNED(align32.Pointer(), 32);
+// GCC doesn't like alignment >64 on ARM.
+#if !defined(ARCH_CPU_ARM_FAMILY) || defined(__clang__)
EXPECT_ALIGNED(align4096.Pointer(), 4096);
+#endif
}

Powered by Google App Engine
This is Rietveld 408576698