mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-12 13:30:51 +00:00
Use early return idiom. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239228 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2ca8f0f5d6
commit
ce986b6bc0
@ -2065,13 +2065,13 @@ std::error_code BitcodeReader::ResolveGlobalAndAliasInits() {
|
||||
if (ValID >= ValueList.size()) {
|
||||
AliasInits.push_back(AliasInitWorklist.back());
|
||||
} else {
|
||||
if (Constant *C = dyn_cast_or_null<Constant>(ValueList[ValID])) {
|
||||
GlobalAlias *Alias = AliasInitWorklist.back().first;
|
||||
if (C->getType() != Alias->getType())
|
||||
return Error("Alias and aliasee types don't match");
|
||||
Alias->setAliasee(C);
|
||||
} else
|
||||
Constant *C = dyn_cast_or_null<Constant>(ValueList[ValID]);
|
||||
if (!C)
|
||||
return Error("Expected a constant");
|
||||
GlobalAlias *Alias = AliasInitWorklist.back().first;
|
||||
if (C->getType() != Alias->getType())
|
||||
return Error("Alias and aliasee types don't match");
|
||||
Alias->setAliasee(C);
|
||||
}
|
||||
AliasInitWorklist.pop_back();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user