aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorManuel Klimek <klimek@google.com>2011-12-21 18:16:39 +0000
committerManuel Klimek <klimek@google.com>2011-12-21 18:16:39 +0000
commit84cbb6f00de84fa04012462a28a3636e13834401 (patch)
treeca8fca2df705cb701ef77cea6028b1b3dcb14403 /utils
parentedae8e1e4d5bd9b59f18ecef04a248be95d8ca46 (diff)
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
Diffstat (limited to 'utils')
-rw-r--r--utils/json-bench/JSONBench.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/utils/json-bench/JSONBench.cpp b/utils/json-bench/JSONBench.cpp
index be2d8d027e..ca8a36a03a 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);