Commit 5d52fb8c authored by Andrew Gallagher's avatar Andrew Gallagher Committed by Facebook Github Bot

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
parent 621adb9c
...@@ -60,7 +60,7 @@ void BENCHFUN(ctorFromArray)(size_t iters, size_t arg) { ...@@ -60,7 +60,7 @@ void BENCHFUN(ctorFromArray)(size_t iters, size_t arg) {
BENCHMARK_PARAM(BENCHFUN(ctorFromArray), 32768); BENCHMARK_PARAM(BENCHFUN(ctorFromArray), 32768);
void BENCHFUN(ctorFromTwoPointers)(size_t iters, size_t arg) { void BENCHFUN(ctorFromTwoPointers)(size_t iters, size_t arg) {
static STRING s; /* library-local */ static STRING s;
BENCHMARK_SUSPEND { BENCHMARK_SUSPEND {
if (s.size() < arg) s.resize(arg); if (s.size() < arg) s.resize(arg);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment