Index: libcxx/benchmarks/string.bench.cpp =================================================================== --- libcxx/benchmarks/string.bench.cpp +++ libcxx/benchmarks/string.bench.cpp @@ -75,7 +75,7 @@ static constexpr char SmallStringLiteral[] = "012345678"; -TEST_ALWAYS_INLINE const char* getSmallString(DiffType D) { +inline TEST_ALWAYS_INLINE const char* getSmallString(DiffType D) { switch (D) { case DiffType::Control: return SmallStringLiteral; @@ -91,7 +91,7 @@ static constexpr char LargeStringLiteral[] = "012345678901234567890123456789012345678901234567890123456789012"; -TEST_ALWAYS_INLINE const char* getLargeString(DiffType D) { +inline TEST_ALWAYS_INLINE const char* getLargeString(DiffType D) { #define LARGE_STRING_FIRST "123456789012345678901234567890" #define LARGE_STRING_SECOND "234567890123456789012345678901" switch (D) { @@ -106,7 +106,7 @@ } } -TEST_ALWAYS_INLINE const char* getHugeString(DiffType D) { +inline TEST_ALWAYS_INLINE const char* getHugeString(DiffType D) { #define HUGE_STRING0 "0123456789" #define HUGE_STRING1 HUGE_STRING0 HUGE_STRING0 HUGE_STRING0 HUGE_STRING0 #define HUGE_STRING2 HUGE_STRING1 HUGE_STRING1 HUGE_STRING1 HUGE_STRING1 @@ -124,6 +124,7 @@ } } +inline TEST_ALWAYS_INLINE std::string makeString(Length L, DiffType D = DiffType::Control, Opacity O = Opacity::Transparent) {