Skip to content

Commit e7858c7

Browse files
Abseil Teamcopybara-github
authored andcommitted
Revert integer-to-string conversion optimizations pending more thorough analysis
PiperOrigin-RevId: 619261152 Change-Id: Id3409b326c52ace0fda42537e0b91dbb2d6a2287
1 parent 86f3019 commit e7858c7

File tree

7 files changed

+208
-755
lines changed

7 files changed

+208
-755
lines changed

absl/base/macros.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,4 +174,16 @@ ABSL_NAMESPACE_END
174174
#define ABSL_DEPRECATE_AND_INLINE()
175175
#endif
176176

177+
// Requires the compiler to prove that the size of the given object is at least
178+
// the expected amount.
179+
#if ABSL_HAVE_ATTRIBUTE(diagnose_if) && ABSL_HAVE_BUILTIN(__builtin_object_size)
180+
#define ABSL_INTERNAL_NEED_MIN_SIZE(Obj, N) \
181+
__attribute__((diagnose_if(__builtin_object_size(Obj, 0) < N, \
182+
"object size provably too small " \
183+
"(this would corrupt memory)", \
184+
"error")))
185+
#else
186+
#define ABSL_INTERNAL_NEED_MIN_SIZE(Obj, N)
187+
#endif
188+
177189
#endif // ABSL_BASE_MACROS_H_

0 commit comments

Comments
 (0)