Frontend: Refactor compileModuleAndReadAST, NFC
This renames `compileModuleAndReadAST`, adding a `BehindLock` suffix, and refactors it to significantly reduce nesting. - Split out helpers `compileModuleAndReadASTImpl` and `readASTAfterCompileModule` which have straight-line code that doesn't worry about locks. - Use `break` in the interesting cases of `switch` statements to reduce nesting. - Use early `return`s to reduce nesting. Detangling the compile-and-read logic from the check-for-locks logic should be a net win for readability, although I also have a side motivation of making the locks optional in a follow-up. No functionality change here. Differential Revision: https://reviews.llvm.org/D95581
Loading
Please sign in to comment