2016-11-17 05:15:24 +08:00
|
|
|
//===-- argdumper.cpp --------------------------------------------*- C++-*-===//
|
2015-02-10 08:30:07 +08:00
|
|
|
//
|
2019-01-19 16:50:56 +08:00
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
2015-02-10 08:30:07 +08:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2019-10-02 01:41:55 +08:00
|
|
|
#include "llvm/Support/JSON.h"
|
2015-02-10 08:30:07 +08:00
|
|
|
|
2019-10-02 01:41:55 +08:00
|
|
|
using namespace llvm;
|
2015-02-10 08:30:07 +08:00
|
|
|
|
|
|
|
int main(int argc, char *argv[]) {
|
2019-10-02 01:41:55 +08:00
|
|
|
json::Array Arguments;
|
2015-02-10 08:30:07 +08:00
|
|
|
for (int i = 1; i < argc; i++) {
|
2019-10-02 01:41:55 +08:00
|
|
|
Arguments.push_back(argv[i]);
|
2015-02-10 08:30:07 +08:00
|
|
|
}
|
2019-10-02 01:41:55 +08:00
|
|
|
llvm::outs() << json::Object({{"arguments", std::move(Arguments)}});
|
2015-02-10 08:30:07 +08:00
|
|
|
return 0;
|
|
|
|
}
|