Skip to content
Snippets Groups Projects
Commit 1db40ee0 authored by Argyrios Kyrtzidis's avatar Argyrios Kyrtzidis
Browse files

[Frontend] Make sure WrapperFrontendAction updates CurrentInput after calling...

[Frontend] Make sure WrapperFrontendAction updates CurrentInput after calling BeginSourceFileAction.

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
parent 4b78517d
No related branches found
No related tags found
No related merge requests found
......@@ -559,7 +559,10 @@ bool WrapperFrontendAction::BeginSourceFileAction(CompilerInstance &CI,
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();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment