File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
include/clang/Tooling/DependencyScanning
lib/Tooling/DependencyScanning Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -183,6 +183,11 @@ struct ModuleDeps {
183
183
// / module. Does not include argv[0].
184
184
const std::vector<std::string> &getBuildArguments () const ;
185
185
186
+ // / Experimental: get a copy of the underlying CompilerInvocation before
187
+ // / calling `getBuildArguments`. This provides a short cut to inspect/modify
188
+ // / the compiler invocation state.
189
+ CowCompilerInvocation getUnderlyingCompilerInvocation () const ;
190
+
186
191
private:
187
192
friend class ModuleDepCollector ;
188
193
friend class ModuleDepCollectorPP ;
Original file line number Diff line number Diff line change @@ -46,6 +46,12 @@ const std::vector<std::string> &ModuleDeps::getBuildArguments() const {
46
46
return std::get<std::vector<std::string>>(BuildInfo);
47
47
}
48
48
49
+ CowCompilerInvocation ModuleDeps::getUnderlyingCompilerInvocation () const {
50
+ assert (std::holds_alternative<CowCompilerInvocation>(BuildInfo) &&
51
+ " ModuleDeps doesn't hold compiler invocation" );
52
+ return *std::get_if<CowCompilerInvocation>(&BuildInfo);
53
+ }
54
+
49
55
static void
50
56
optimizeHeaderSearchOpts (HeaderSearchOptions &Opts, ASTReader &Reader,
51
57
const serialization::ModuleFile &MF,
You can’t perform that action at this time.
0 commit comments