diff options
author | Fangrui Song <maskray@google.com> | 2018-10-22 17:10:47 +0000 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2018-10-22 17:10:47 +0000 |
commit | 32401afd8cb86680afa1bc93e732b5fbc5a83401 (patch) | |
tree | 104d8d309cfeaaf0686baf678eb784dd6116b8a7 /llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp | |
parent | 8d8dcfe690e64608f89af071038851f1c4925ee4 (diff) | |
download | llvm-32401afd8cb86680afa1bc93e732b5fbc5a83401.zip llvm-32401afd8cb86680afa1bc93e732b5fbc5a83401.tar.gz llvm-32401afd8cb86680afa1bc93e732b5fbc5a83401.tar.bz2 |
[llvm-exegesis] Move namespace exegesis inside llvm::
Summary:
This allows simplifying references of llvm::foo with foo when the needs
come in the future.
Reviewers: courbet, gchatelet
Reviewed By: gchatelet
Subscribers: javed.absar, tschuett, llvm-commits
Differential Revision: https://reviews.llvm.org/D53455
llvm-svn: 344922
Diffstat (limited to 'llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp')
-rw-r--r-- | llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp b/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp index 5d4912e..4b91c6c 100644 --- a/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp +++ b/llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp @@ -22,6 +22,10 @@ static constexpr const char kIntegerPrefix[] = "i_0x"; static constexpr const char kDoublePrefix[] = "f_"; static constexpr const char kInvalidOperand[] = "INVALID"; +namespace llvm { + +namespace { + // A mutable struct holding an LLVMState that can be passed through the // serialization process to encode/decode registers and instructions. struct YamlContext { @@ -141,13 +145,13 @@ private: return 0; } - const exegesis::LLVMState *State; + const llvm::exegesis::LLVMState *State; std::string LastError; llvm::raw_string_ostream ErrorStream; }; +} // namespace // Defining YAML traits for IO. -namespace llvm { namespace yaml { static YamlContext &getTypedContext(void *Ctx) { @@ -294,7 +298,6 @@ struct MappingContextTraits<exegesis::InstructionBenchmark, YamlContext> { }; } // namespace yaml -} // namespace llvm namespace exegesis { @@ -384,3 +387,4 @@ void PerInstructionStats::push(const BenchmarkMeasure &BM) { } } // namespace exegesis +} // namespace llvm |