benchmark_main.h 732 B

12345678910111213141516171819202122
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. #ifndef CARBON_COMMON_BENCHMARK_MAIN_H_
  5. #define CARBON_COMMON_BENCHMARK_MAIN_H_
  6. #include "llvm/ADT/StringRef.h"
  7. // When using the Carbon `main` function for benchmarks, we export some extra
  8. // information about the test binary that can be accessed with this header.
  9. //
  10. // TODO: Refactor this to share code with `gtest_main.h`.
  11. namespace Carbon::Testing {
  12. // Returns the executable path of the benchmark binary.
  13. auto GetBenchmarkExePath() -> llvm::StringRef;
  14. } // namespace Carbon::Testing
  15. #endif // CARBON_COMMON_BENCHMARK_MAIN_H_