diff options
author | jar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-15 19:41:04 +0000 |
---|---|---|
committer | jar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-15 19:41:04 +0000 |
commit | e4f682aa5f67f5cbc3fd358f45495f94f951af40 (patch) | |
tree | 785951035e3bc12eaa360b7e358198aa6c02771e /base/json | |
parent | f6fa051e3747f04245e3b28b041286c57235145b (diff) | |
download | chromium_src-e4f682aa5f67f5cbc3fd358f45495f94f951af40.zip chromium_src-e4f682aa5f67f5cbc3fd358f45495f94f951af40.tar.gz chromium_src-e4f682aa5f67f5cbc3fd358f45495f94f951af40.tar.bz2 |
Revert 114680 - Remove FRIEND_TEST declarations to improve optimizations
Friends may access methods that are otherwise unused.
Removing friends may cause dead-code elimination, and
also reduce the need for copies of entry points (allowing
more inlining).
r=laforge
TBR=jar@chromium.org
Review URL: http://codereview.chromium.org/8970002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114682 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/json')
-rw-r--r-- | base/json/json_reader.h | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/base/json/json_reader.h b/base/json/json_reader.h index 2df1b6b..be3aef2 100644 --- a/base/json/json_reader.h +++ b/base/json/json_reader.h @@ -37,19 +37,8 @@ // Chromium and Chromium OS check out gtest to different places, so we're // unable to compile on both if we include gtest_prod.h here. Instead, include // its only contents -- this will need to be updated if the macro ever changes. -#if defined(GOOGLE_CHROME_BUILD) - -// Provide a no-op that can live in a class definition. -// We can't use an expression, so we define a useless local class name. -#define FRIEND_TEST(test_case_name, test_name) \ - class test_case_name##_##test_name##_Test {int garbage;} - -#else - -#define FRIEND_TEST(test_case_name, test_name) \ - friend class test_case_name##_##test_name##_Test - -#endif +#define FRIEND_TEST(test_case_name, test_name)\ +friend class test_case_name##_##test_name##_Test #define FRIEND_TEST_ALL_PREFIXES(test_case_name, test_name) \ FRIEND_TEST(test_case_name, test_name); \ |