diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2021-01-27 18:16:51 -0800 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2021-08-12 15:16:08 -0700 |
commit | c130300f8ba0363749cf2490bbd43515fad8a759 (patch) | |
tree | ab720f9fedd787e9718681ff5930d4f5dfb207eb /clang/lib/Frontend/CreateInvocationFromCommandLine.cpp | |
parent | f9c8602b53fd277e1428cb6e8e63485b14520a82 (diff) | |
download | llvm-c130300f8ba0363749cf2490bbd43515fad8a759.zip llvm-c130300f8ba0363749cf2490bbd43515fad8a759.tar.gz llvm-c130300f8ba0363749cf2490bbd43515fad8a759.tar.bz2 |
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
Diffstat (limited to 'clang/lib/Frontend/CreateInvocationFromCommandLine.cpp')
0 files changed, 0 insertions, 0 deletions