I don't have a test case to add unfortunately.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260937
91177308-0d34-0410-b5e6-
96231b3b80d8
StringRef Filename) {
WrappedAction->setCurrentInput(getCurrentInput());
WrappedAction->setCompilerInstance(&CI);
- return WrappedAction->BeginSourceFileAction(CI, Filename);
+ auto Ret = WrappedAction->BeginSourceFileAction(CI, Filename);
+ // BeginSourceFileAction may change CurrentInput, e.g. during module builds.
+ setCurrentInput(WrappedAction->getCurrentInput());
+ return Ret;
}
void WrapperFrontendAction::ExecuteAction() {
WrappedAction->ExecuteAction();