mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-22 23:24:59 +00:00
Use an early exit in DIBuilder::finalize() to improve readability.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241465 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -73,7 +73,12 @@ void DIBuilder::trackIfUnresolved(MDNode *N) {
|
||||
}
|
||||
|
||||
void DIBuilder::finalize() {
|
||||
if (CUNode) {
|
||||
if (!CUNode) {
|
||||
assert(!AllowUnresolvedNodes &&
|
||||
"creating type nodes without a CU is not supported");
|
||||
return;
|
||||
}
|
||||
|
||||
CUNode->replaceEnumTypes(MDTuple::get(VMContext, AllEnumTypes));
|
||||
|
||||
SmallVector<Metadata *, 16> RetainValues;
|
||||
@@ -103,7 +108,6 @@ void DIBuilder::finalize() {
|
||||
CUNode->replaceImportedEntities(MDTuple::get(
|
||||
VMContext, SmallVector<Metadata *, 16>(AllImportedModules.begin(),
|
||||
AllImportedModules.end())));
|
||||
}
|
||||
|
||||
// Now that all temp nodes have been replaced or deleted, resolve remaining
|
||||
// cycles.
|
||||
|
Reference in New Issue
Block a user