diff options
| author | Sam McCall <sam.mccall@gmail.com> | 2018-07-09 14:25:59 +0000 |
|---|---|---|
| committer | Sam McCall <sam.mccall@gmail.com> | 2018-07-09 14:25:59 +0000 |
| commit | d20d7989c678f9458df7880f7644b3316ee5f1dd (patch) | |
| tree | 78af542bf097f028e8fd6dfd98cce481c47e7860 /clang-tools-extra/clangd/Trace.h | |
| parent | 3d76326d24310638fff26267e24b5473b543913d (diff) | |
| download | bcm5719-llvm-d20d7989c678f9458df7880f7644b3316ee5f1dd.tar.gz bcm5719-llvm-d20d7989c678f9458df7880f7644b3316ee5f1dd.zip | |
[clangd] Remove JSON library in favor of llvm/Support/JSON
Summary:
The library has graduated from clangd to llvm/Support.
This is a mechanical change to move to the new API and remove the old one.
Main API changes:
- namespace clang::clangd::json --> llvm::json
- json::Expr --> json::Value
- Expr::asString() etc --> Value::getAsString() etc
- unsigned longs need a cast (due to r336541 adding lossless integer support)
Reviewers: ilya-biryukov
Subscribers: mgorny, ioeric, MaskRay, jkorous, omtcyfz, cfe-commits
Differential Revision: https://reviews.llvm.org/D49077
llvm-svn: 336549
Diffstat (limited to 'clang-tools-extra/clangd/Trace.h')
| -rw-r--r-- | clang-tools-extra/clangd/Trace.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clang-tools-extra/clangd/Trace.h b/clang-tools-extra/clangd/Trace.h index 131ace55908..0c4c461855d 100644 --- a/clang-tools-extra/clangd/Trace.h +++ b/clang-tools-extra/clangd/Trace.h @@ -20,8 +20,8 @@ #include "Context.h" #include "Function.h" -#include "JSONExpr.h" #include "llvm/ADT/Twine.h" +#include "llvm/Support/JSON.h" #include "llvm/Support/raw_ostream.h" namespace clang { @@ -39,7 +39,7 @@ public: /// Usually implementations will store an object in the returned context /// whose destructor records the end of the event. /// The args are *Args, only complete when the event ends. - virtual Context beginSpan(llvm::StringRef Name, json::obj *Args) = 0; + virtual Context beginSpan(llvm::StringRef Name, llvm::json::Object *Args) = 0; // Called when a Span is destroyed (it may still be active on other threads). // beginSpan() and endSpan() will always form a proper stack on each thread. // The Context returned by beginSpan is active, but Args is not ready. @@ -48,7 +48,7 @@ public: virtual void endSpan(){}; /// Called for instant events. - virtual void instant(llvm::StringRef Name, json::obj &&Args) = 0; + virtual void instant(llvm::StringRef Name, llvm::json::Object &&Args) = 0; }; /// Sets up a global EventTracer that consumes events produced by Span and @@ -87,7 +87,7 @@ public: /// Mutable metadata, if this span is interested. /// Prefer to use SPAN_ATTACH rather than accessing this directly. - json::obj *const Args; + llvm::json::Object *const Args; private: WithContext RestoreCtx; |

