Skip to content

Commit

Permalink
[clang] Allow CompilerInvocation to change CASOptions
Browse files Browse the repository at this point in the history
Add APIs to change CASOptions inside CompilerInvocation. This is needed
to make copies of CompilerInvocations but share the underlying CAS
storage and avoid making more CAS storages that points to the same
location.
  • Loading branch information
cachemeifyoucan authored and Michael137 committed Dec 16, 2024
1 parent d64c6cf commit 75c217d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions clang/include/clang/Frontend/CompilerInvocation.h
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,10 @@ class CompilerInvocation : public CompilerInvocationBase {
return PPOpts;
}
std::shared_ptr<LangOptions> getLangOptsPtr() { return LangOpts; }
std::shared_ptr<CASOptions> getCASOptsPtr() { return CASOpts; }
void setCASOption(std::shared_ptr<CASOptions> CASOpts) {
this->CASOpts = CASOpts;
}
/// @}

/// Create a compiler invocation from a list of input options.
Expand Down

0 comments on commit 75c217d

Please sign in to comment.