mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Simple style fixes.
* Use a range loop. * Move simple continue checks earlier. * clang-format. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223654 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
95d1d167d0
commit
254e67955f
@ -1475,27 +1475,28 @@ bool ModuleLinker::run() {
|
||||
|
||||
// Link in the function bodies that are defined in the source module into
|
||||
// DstM.
|
||||
for (Module::iterator SF = SrcM->begin(), E = SrcM->end(); SF != E; ++SF) {
|
||||
// Skip if not linking from source.
|
||||
if (DoNotLinkFromSource.count(SF)) continue;
|
||||
|
||||
Function *DF = cast<Function>(ValueMap[SF]);
|
||||
|
||||
// Link in the prefix data.
|
||||
if (SF->hasPrefixData())
|
||||
DF->setPrefixData(MapValue(
|
||||
SF->getPrefixData(), ValueMap, RF_None, &TypeMap, &ValMaterializer));
|
||||
|
||||
// Link in the prologue data.
|
||||
if (SF->hasPrologueData())
|
||||
DF->setPrologueData(MapValue(
|
||||
SF->getPrologueData(), ValueMap, RF_None, &TypeMap, &ValMaterializer));
|
||||
|
||||
for (Function &SF : *SrcM) {
|
||||
// Skip if no body (function is external).
|
||||
if (SF->isDeclaration())
|
||||
if (SF.isDeclaration())
|
||||
continue;
|
||||
|
||||
if (linkFunctionBody(DF, SF))
|
||||
// Skip if not linking from source.
|
||||
if (DoNotLinkFromSource.count(&SF))
|
||||
continue;
|
||||
|
||||
Function *DF = cast<Function>(ValueMap[&SF]);
|
||||
|
||||
// Link in the prefix data.
|
||||
if (SF.hasPrefixData())
|
||||
DF->setPrefixData(MapValue(SF.getPrefixData(), ValueMap, RF_None,
|
||||
&TypeMap, &ValMaterializer));
|
||||
|
||||
// Link in the prologue data.
|
||||
if (SF.hasPrologueData())
|
||||
DF->setPrologueData(MapValue(SF.getPrologueData(), ValueMap, RF_None,
|
||||
&TypeMap, &ValMaterializer));
|
||||
|
||||
if (linkFunctionBody(DF, &SF))
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user