[clang] Change ordering of PreableCallbacks to make sure PP can be referenced in...
authorKirill Bobyrev <kbobyrev@google.com>
Fri, 26 Nov 2021 09:10:49 +0000 (10:10 +0100)
committerKirill Bobyrev <kbobyrev@google.com>
Fri, 26 Nov 2021 09:10:52 +0000 (10:10 +0100)
commitbad8977786382739256f4bd966fb4cdcfd50be2a
tree0ae0d6f97cbdeee41093c854ccb9e36c9ef66afe
parent86137fb7229363fef9a4bbb732dc13f7cb1c5dfd
[clang] Change ordering of PreableCallbacks to make sure PP can be referenced in them

Currently, BeforeExecute is called before BeginSourceFile which does not allow
using PP in the callbacks. Change the ordering to ensure it is possible.
This is a prerequisite for D114370.

Originated from a discussion with @kadircet.

Reviewed By: sammccall

Differential Revision: https://reviews.llvm.org/D114525
clang/include/clang/Frontend/PrecompiledPreamble.h
clang/lib/Frontend/PrecompiledPreamble.cpp