aboutsummaryrefslogtreecommitdiffstats
path: root/tools/argdumper/argdumper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/argdumper/argdumper.cpp')
-rw-r--r--tools/argdumper/argdumper.cpp22
1 files changed, 5 insertions, 17 deletions
diff --git a/tools/argdumper/argdumper.cpp b/tools/argdumper/argdumper.cpp
index 7fd8999c5dce..1cf0d6dae7a4 100644
--- a/tools/argdumper/argdumper.cpp
+++ b/tools/argdumper/argdumper.cpp
@@ -6,27 +6,15 @@
//
//===----------------------------------------------------------------------===//
-#include "lldb/Utility/JSON.h"
-#include "lldb/Utility/StreamString.h"
+#include "llvm/Support/JSON.h"
-#include <iostream>
-
-using namespace lldb_private;
+using namespace llvm;
int main(int argc, char *argv[]) {
- JSONArray::SP arguments(new JSONArray());
+ json::Array Arguments;
for (int i = 1; i < argc; i++) {
- arguments->AppendObject(JSONString::SP(new JSONString(argv[i])));
+ Arguments.push_back(argv[i]);
}
-
- JSONObject::SP object(new JSONObject());
- object->SetObject("arguments", arguments);
-
- StreamString ss;
-
- object->Write(ss);
-
- std::cout << ss.GetData() << std::endl;
-
+ llvm::outs() << json::Object({{"arguments", std::move(Arguments)}});
return 0;
}