diff options
| author | Eric Fiselier <eric@efcs.ca> | 2016-11-05 00:30:27 +0000 |
|---|---|---|
| committer | Eric Fiselier <eric@efcs.ca> | 2016-11-05 00:30:27 +0000 |
| commit | fbc9ff244c0da5a8e4e566b70a8fec3a50d88532 (patch) | |
| tree | 4143967ceb2630a5493a109e7a41e237bb34e422 /libcxx/utils/google-benchmark/src/commandlineflags.h | |
| parent | 3a6f331d2d044e15f2e3b54bd776ba882ad06e52 (diff) | |
| download | bcm5719-llvm-fbc9ff244c0da5a8e4e566b70a8fec3a50d88532.tar.gz bcm5719-llvm-fbc9ff244c0da5a8e4e566b70a8fec3a50d88532.zip | |
Upgrade in-tree google benchmark to v1.1
llvm-svn: 286029
Diffstat (limited to 'libcxx/utils/google-benchmark/src/commandlineflags.h')
| -rw-r--r-- | libcxx/utils/google-benchmark/src/commandlineflags.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libcxx/utils/google-benchmark/src/commandlineflags.h b/libcxx/utils/google-benchmark/src/commandlineflags.h index 34b9c6f30e9..945c9a9fc4a 100644 --- a/libcxx/utils/google-benchmark/src/commandlineflags.h +++ b/libcxx/utils/google-benchmark/src/commandlineflags.h @@ -38,8 +38,7 @@ const char* StringFromEnv(const char* flag, const char* default_val); // Parses a string for a bool flag, in the form of either // "--flag=value" or "--flag". // -// In the former case, the value is taken as true as long as it does -// not start with '0', 'f', or 'F'. +// In the former case, the value is taken as true if it passes IsTruthyValue(). // // In the latter case, the value is taken as true. // @@ -71,6 +70,10 @@ bool ParseStringFlag(const char* str, const char* flag, std::string* value); // Returns true if the string matches the flag. bool IsFlag(const char* str, const char* flag); +// Returns true unless value starts with one of: '0', 'f', 'F', 'n' or 'N', or +// some non-alphanumeric character. As a special case, also returns true if +// value is the empty string. +bool IsTruthyFlagValue(const std::string& value); } // end namespace benchmark #endif // BENCHMARK_COMMANDLINEFLAGS_H_ |

