Skip to content

Commit 3d29cd8

Browse files
committed
Print options from clang-scan-deps
1 parent b8f5cbb commit 3d29cd8

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

clang/tools/clang-scan-deps/ClangScanDeps.cpp

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -852,6 +852,29 @@ getCompilationDatabase(int argc, char **argv, std::string &ErrorMessage) {
852852
}
853853

854854
int clang_scan_deps_main(int argc, char **argv, const llvm::ToolContext &) {
855+
#define LANGOPT(Name, Bits, DefaultValue, Description) \
856+
llvm::outs() << #Name << " " << Bits << " " << #DefaultValue << " " \
857+
<< "Affecting" << " " << Description << "\n";
858+
#define COMPATIBLE_LANGOPT(Name, Bits, DefaultValue, Description) \
859+
llvm::outs() << #Name << " " << Bits << " " << #DefaultValue << " " \
860+
<< "Compatible" << " " << Description << "\n";
861+
#define COMPATIBLE_VALUE_LANGOPT(Name, Bits, DefaultValue, Description) \
862+
llvm::outs() << #Name << " " << Bits << " " << #DefaultValue << " " \
863+
<< "Compatible" << " " << Description << "\n";
864+
#define COMPATIBLE_ENUM_LANGOPT(Name, Type, Bits, DefaultValue, Description) \
865+
llvm::outs() << #Name << " " << Bits << " " << #DefaultValue << " " \
866+
<< "Compatible" << " " << Description << "\n";
867+
#define BENIGN_LANGOPT(Name, Bits, DefaultValue, Description) \
868+
llvm::outs() << #Name << " " << Bits << " " << #DefaultValue << " " \
869+
<< "Benign" << " " << Description << "\n";
870+
#define BENIGN_VALUE_LANGOPT(Name, Bits, DefaultValue, Description) \
871+
llvm::outs() << #Name << " " << Bits << " " << #DefaultValue << " " \
872+
<< "Benign" << " " << Description << "\n";
873+
#define BENIGN_ENUM_LANGOPT(Name, Type, Bits, DefaultValue, Description) \
874+
llvm::outs() << #Name << " " << Bits << " " << #DefaultValue << " " \
875+
<< "Benign" << " " << Description << "\n";
876+
#include "clang/Basic/LangOptions.def"
877+
855878
llvm::InitializeAllTargetInfos();
856879
std::string ErrorMessage;
857880
std::unique_ptr<tooling::CompilationDatabase> Compilations =

0 commit comments

Comments
 (0)