We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b331c62 + e1b3ad8 commit 5fec104Copy full SHA for 5fec104
lib/DependencyScan/DependencyScanningTool.cpp
@@ -101,6 +101,12 @@ DependencyScanningTool::initCompilerInstanceForScan(
101
SmallString<128> WorkingDirectory;
102
llvm::sys::fs::current_path(WorkingDirectory);
103
104
+ // We must reset option occurences because we are handling an unrelated
105
+ // command-line to those possibly parsed parsed before using the same tool.
106
+ // We must do so because LLVM options parsing is done using a managed
107
+ // static `GlobalParser`.
108
+ llvm::cl::ResetAllOptionOccurrences();
109
+
110
// Parse arguments.
111
std::string CommandString;
112
for (const auto *c : Command) {
0 commit comments