From 84cbb6f00de84fa04012462a28a3636e13834401 Mon Sep 17 00:00:00 2001 From: Manuel Klimek Date: Wed, 21 Dec 2011 18:16:39 +0000 Subject: Changes the JSON parser to use the SourceMgr. Diagnostics are now emitted via the SourceMgr and we use MemoryBuffer for buffer management. Switched the code to make use of the trailing '0' that MemoryBuffer guarantees where it makes sense. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147063 91177308-0d34-0410-b5e6-96231b3b80d8 --- utils/json-bench/JSONBench.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'utils') diff --git a/utils/json-bench/JSONBench.cpp b/utils/json-bench/JSONBench.cpp index be2d8d0..ca8a36a 100644 --- a/utils/json-bench/JSONBench.cpp +++ b/utils/json-bench/JSONBench.cpp @@ -41,7 +41,8 @@ void benchmark(llvm::TimerGroup &Group, llvm::StringRef Name, llvm::Timer Parsing((Name + ": Parsing").str(), Group); Parsing.startTimer(); - llvm::JSONParser Parser(JSONText); + llvm::SourceMgr SM; + llvm::JSONParser Parser(JSONText, &SM); if (!Parser.validate()) { llvm::errs() << "Parsing error in JSON parser benchmark.\n"; exit(1); -- cgit v1.1