You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: generator/main.cpp
+38-11Lines changed: 38 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@
22
22
23
23
#include"llvm/Support/CommandLine.h"
24
24
#include"clang/Frontend/FrontendActions.h"
25
-
#include"clang/Tooling/CompilationDatabase.h"
25
+
#include"clang/Tooling/JSONCompilationDatabase.h"
26
26
#include"clang/Tooling/Tooling.h"
27
27
#include"clang/AST/ASTContext.h"
28
28
@@ -49,38 +49,56 @@ namespace cl = llvm::cl;
49
49
50
50
cl::opt<std::string> BuildPath(
51
51
"b",
52
-
cl::desc("<build-path>"),
52
+
cl::value_desc("compile_commands.json"),
53
+
cl::desc("Path to the compilation database (compile_commands.json) If this argument is not passed, the compilation arguments can be passed on the command line after '--'"),
53
54
cl::Optional);
54
55
55
56
cl::list<std::string> SourcePaths(
56
57
cl::Positional,
57
-
cl::desc("(<source0> [... <sourceN>])|<path>"),
58
+
cl::desc("<sources>* [-- <compile command>]"),
58
59
cl::ZeroOrMore);
59
60
60
61
cl::opt<std::string> OutputPath(
61
62
"o",
62
-
cl::desc("<output path>"),
63
+
cl::value_desc("output path"),
64
+
cl::desc("Output directory where the generated files will be put"),
63
65
cl::Required);
64
66
65
67
cl::list<std::string> ProjectPaths(
66
68
"p",
67
-
cl::desc("<project>:<path>[:<revision>]"),
69
+
cl::value_desc("<project>:<path>[:<revision>]"),
70
+
cl::desc("Project specification: The name of the project, the absolute path of the source code, and the revision separated by colons. Example: -p projectname:/path/to/source/code:0.3beta"),
68
71
cl::ZeroOrMore);
69
72
70
73
71
74
cl::list<std::string> ExternalProjectPaths(
72
75
"e",
73
-
cl::desc("<project>:<path>:<url>"),
76
+
cl::value_desc("<project>:<path>:<url>"),
77
+
cl::desc("Reference to an external project. Example: -e clang/include/clang:/opt/llvm/include/clang/:https://code.woboq.org/llvm"),
74
78
cl::ZeroOrMore);
75
79
76
80
cl::opt<std::string> DataPath(
77
81
"d",
78
-
cl::desc("<data path>"),
82
+
cl::value_desc("data path"),
83
+
cl::desc("Data url where all the javascript and css files are found. Can be absolute, or relative to the output directory. Defaults to ../data"),
79
84
cl::Optional);
80
85
81
86
cl::opt<bool> ProcessAllSources(
82
87
"a",
83
-
cl::desc("Process all sources in the compilation_database.json (should not have sources then)"));
88
+
cl::desc("Process all files from the compile_commands.json. If this argument is passed, the list of sources does not need to be passed"));
89
+
90
+
cl::extrahelp extra(
91
+
92
+
R"(
93
+
94
+
EXAMPLES:
95
+
96
+
Simple generation without compile command or project (compile command specified inline)
0 commit comments