about summary refs log tree commit diff
path: root/absl
diff options
context:
space:
mode:
Diffstat (limited to 'absl')
-rw-r--r--absl/base/attributes.h10
-rw-r--r--absl/base/internal/malloc_hook.cc1
-rw-r--r--absl/strings/str_split_test.cc6
-rw-r--r--absl/synchronization/blocking_counter.h1
4 files changed, 15 insertions, 3 deletions
diff --git a/absl/base/attributes.h b/absl/base/attributes.h
index 4e1fc8b550d1..c44b2e893258 100644
--- a/absl/base/attributes.h
+++ b/absl/base/attributes.h
@@ -527,6 +527,16 @@
 #define ABSL_ATTRIBUTE_PACKED
 #endif
 
+// ABSL_ATTRIBUTE_FUNC_ALIGN
+//
+// Tells the compiler to align the function start at least to certain
+// alignment boundary
+#if ABSL_HAVE_ATTRIBUTE(aligned) || (defined(__GNUC__) && !defined(__clang__))
+#define ABSL_ATTRIBUTE_FUNC_ALIGN(bytes) __attribute__((aligned(bytes)))
+#else
+#define ABSL_ATTRIBUTE_FUNC_ALIGN(bytes)
+#endif
+
 // ABSL_CONST_INIT
 //
 // A variable declaration annotated with the `ABSL_CONST_INIT` attribute will
diff --git a/absl/base/internal/malloc_hook.cc b/absl/base/internal/malloc_hook.cc
index 780e8fe3296c..e7b626df125b 100644
--- a/absl/base/internal/malloc_hook.cc
+++ b/absl/base/internal/malloc_hook.cc
@@ -437,6 +437,7 @@ static inline bool InHookCaller(const void* caller) {
   return ADDR_IN_ATTRIBUTE_SECTION(caller, google_malloc) ||
          ADDR_IN_ATTRIBUTE_SECTION(caller, malloc_hook) ||
          ADDR_IN_ATTRIBUTE_SECTION(caller, blink_malloc);
+
   // We can use one section for everything except tcmalloc_or_debug
   // due to its special linkage mode, which prevents merging of the sections.
 }
diff --git a/absl/strings/str_split_test.cc b/absl/strings/str_split_test.cc
index b1db1c5647e7..16b047a1de85 100644
--- a/absl/strings/str_split_test.cc
+++ b/absl/strings/str_split_test.cc
@@ -621,7 +621,7 @@ TEST(Split, StringDelimiter) {
 
 TEST(Split, UTF8) {
   // Tests splitting utf8 strings and utf8 delimiters.
-  std::string utf8_string = "\u03BA\u1F79\u03C3\u03BC\u03B5";
+  std::string utf8_string = u8"\u03BA\u1F79\u03C3\u03BC\u03B5";
   {
     // A utf8 input std::string with an ascii delimiter.
     std::string to_split = "a," + utf8_string;
@@ -641,8 +641,8 @@ TEST(Split, UTF8) {
   {
     // A utf8 input std::string and ByAnyChar with ascii chars.
     std::vector<absl::string_view> v =
-        absl::StrSplit("Foo h\u00E4llo th\u4E1Ere", absl::ByAnyChar(" \t"));
-    EXPECT_THAT(v, ElementsAre("Foo", "h\u00E4llo", "th\u4E1Ere"));
+        absl::StrSplit(u8"Foo h\u00E4llo th\u4E1Ere", absl::ByAnyChar(" \t"));
+    EXPECT_THAT(v, ElementsAre("Foo", u8"h\u00E4llo", u8"th\u4E1Ere"));
   }
 }
 
diff --git a/absl/synchronization/blocking_counter.h b/absl/synchronization/blocking_counter.h
index 476d5f8f9885..557ed028fe52 100644
--- a/absl/synchronization/blocking_counter.h
+++ b/absl/synchronization/blocking_counter.h
@@ -93,4 +93,5 @@ class BlockingCounter {
 };
 
 }  // namespace absl
+
 #endif  // ABSL_SYNCHRONIZATION_BLOCKING_COUNTER_H_