From 5d52fb8c30e567403b8ccb65e5c1a159fb92d707 Mon Sep 17 00:00:00 2001 From: Andrew Gallagher Date: Sun, 6 Nov 2016 20:06:46 -0800 Subject: [PATCH] Annotate some static locals as "library-local" Summary: This tags certain static locals, wich may get duplicated via dynamic linking and inlining, as safe to have multiple copies at runtime, making this subtle behavior explicit. Reviewed By: igorsugak Differential Revision: D4082929 fbshipit-source-id: ba4e23cb121e957a43f5659a1ca3432cb89cb8f3 --- folly/test/FBStringTestBenchmarks.cpp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/folly/test/FBStringTestBenchmarks.cpp.h b/folly/test/FBStringTestBenchmarks.cpp.h index 632f7bd6..f353001e 100644 --- a/folly/test/FBStringTestBenchmarks.cpp.h +++ b/folly/test/FBStringTestBenchmarks.cpp.h @@ -60,7 +60,7 @@ void BENCHFUN(ctorFromArray)(size_t iters, size_t arg) { BENCHMARK_PARAM(BENCHFUN(ctorFromArray), 32768); void BENCHFUN(ctorFromTwoPointers)(size_t iters, size_t arg) { - static STRING s; + /* library-local */ static STRING s; BENCHMARK_SUSPEND { if (s.size() < arg) s.resize(arg); } -- 2.34.1