mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
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
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user