about summary refs log tree commit diff
path: root/absl/flags/internal/commandlineflag.cc
diff options
context:
space:
mode:
Diffstat (limited to 'absl/flags/internal/commandlineflag.cc')
-rw-r--r--absl/flags/internal/commandlineflag.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/absl/flags/internal/commandlineflag.cc b/absl/flags/internal/commandlineflag.cc
index 53e2b84ecc13..99f73611d8f1 100644
--- a/absl/flags/internal/commandlineflag.cc
+++ b/absl/flags/internal/commandlineflag.cc
@@ -149,6 +149,12 @@ std::string CommandLineFlag::CurrentValue() const {
   return Unparse(marshalling_op_, cur_);
 }
 
+int64_t CommandLineFlag::MutationCounter() const {
+  absl::MutexLock l(InitFlagIfNecessary());
+
+  return counter_;
+}
+
 // Attempts to parse supplied `value` string using parsing routine in the `flag`
 // argument. If parsing is successful, it will try to validate that the parsed
 // value is valid for the specified 'flag'. Finally this function stores the