mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-15 06:29:05 +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:
@@ -1475,27 +1475,28 @@ bool ModuleLinker::run() {
|
|||||||
|
|
||||||
// Link in the function bodies that are defined in the source module into
|
// Link in the function bodies that are defined in the source module into
|
||||||
// DstM.
|
// DstM.
|
||||||
for (Module::iterator SF = SrcM->begin(), E = SrcM->end(); SF != E; ++SF) {
|
for (Function &SF : *SrcM) {
|
||||||
// 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));
|
|
||||||
|
|
||||||
// Skip if no body (function is external).
|
// Skip if no body (function is external).
|
||||||
if (SF->isDeclaration())
|
if (SF.isDeclaration())
|
||||||
continue;
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user