aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/CallGraphUpdater.cpp
diff options
context:
space:
mode:
authorSam McCall <sam.mccall@gmail.com>2020-09-24 00:01:45 +0200
committerSam McCall <sam.mccall@gmail.com>2020-09-24 00:09:09 +0200
commit16619e7139bdcb0021598ba76cb5cf30ac669dbb (patch)
tree238b7b4841dd5b808ee9ceefe2ad482f1615a56c /llvm/lib/Transforms/Utils/CallGraphUpdater.cpp
parent8f2c31f22b974da2c0fbc5de0ce4dceffe8ed0b8 (diff)
downloadllvm-16619e7139bdcb0021598ba76cb5cf30ac669dbb.zip
llvm-16619e7139bdcb0021598ba76cb5cf30ac669dbb.tar.gz
llvm-16619e7139bdcb0021598ba76cb5cf30ac669dbb.tar.bz2
[JSON] Facility to track position within an object and report errors.
This error model should be rich enough for most applications. It comprises: - a name for the root object, so the user knows what we're parsing - a path from the root object to the JSON node most associated with the error - a local error message This can be presented as an llvm::Error e.g. "expected string at ConfigFile.credentials[0].username" It's designed to be cheap: Paths are a linked list of lightweight objects on the stack. No heap allocations unless errors are encountered. A subsequent commit will make use of this in the JSON-to-object translation facilities: fromJSON and ObjectMapper. However it's independent of these and can be used for e.g. validation alone. Another subsequent commit will support showing the error in its context within the parsed value. Differential Revision: https://reviews.llvm.org/D88103
Diffstat (limited to 'llvm/lib/Transforms/Utils/CallGraphUpdater.cpp')
0 files changed, 0 insertions, 0 deletions