[swiftinterface] Improve target overwrite for the swiftinterface

In certain cases (e.g. using arm64e interface to build arm64 target),
the target needs to be updated when building swiftinterface. Push the
target overwrite as early as possible to swiftinterface parsing by
providing a preferred target to relevant functions. In such cases, the
wrong target is never observed by other functions to avoid errors like
the sub-invocation was partially setup for the wrong target.
This commit is contained in:
Steven Wu
2024-02-15 13:26:04 -08:00
parent cdeef58e0f
commit 9f736811f0
4 changed files with 37 additions and 66 deletions

View File

@@ -643,7 +643,6 @@ private:
llvm::StringSaver ArgSaver;
std::vector<StringRef> GenericArgs;
CompilerInvocation genericSubInvocation;
llvm::Triple ParentInvocationTarget;
template<typename ...ArgTypes>
InFlightDiagnostic diagnose(StringRef interfacePath,