mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-27 00:21:03 +00:00
Bitcode: Reflow code to use early continues, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233578 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -2106,24 +2106,27 @@ static void WriteFunction(const Function &F, ValueEnumerator &VE,
|
|||||||
// If the instruction has a debug location, emit it.
|
// If the instruction has a debug location, emit it.
|
||||||
DebugLoc DL = I->getDebugLoc();
|
DebugLoc DL = I->getDebugLoc();
|
||||||
if (DL.isUnknown()) {
|
if (DL.isUnknown()) {
|
||||||
// nothing todo.
|
continue;
|
||||||
} else if (DL == LastDL) {
|
}
|
||||||
|
|
||||||
|
if (DL == LastDL) {
|
||||||
// Just repeat the same debug loc as last time.
|
// Just repeat the same debug loc as last time.
|
||||||
Stream.EmitRecord(bitc::FUNC_CODE_DEBUG_LOC_AGAIN, Vals);
|
Stream.EmitRecord(bitc::FUNC_CODE_DEBUG_LOC_AGAIN, Vals);
|
||||||
} else {
|
continue;
|
||||||
MDNode *Scope, *IA;
|
|
||||||
DL.getScopeAndInlinedAt(Scope, IA, I->getContext());
|
|
||||||
assert(Scope && "Expected valid scope");
|
|
||||||
|
|
||||||
Vals.push_back(DL.getLine());
|
|
||||||
Vals.push_back(DL.getCol());
|
|
||||||
Vals.push_back(VE.getMetadataOrNullID(Scope));
|
|
||||||
Vals.push_back(VE.getMetadataOrNullID(IA));
|
|
||||||
Stream.EmitRecord(bitc::FUNC_CODE_DEBUG_LOC, Vals);
|
|
||||||
Vals.clear();
|
|
||||||
|
|
||||||
LastDL = DL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MDNode *Scope, *IA;
|
||||||
|
DL.getScopeAndInlinedAt(Scope, IA, I->getContext());
|
||||||
|
assert(Scope && "Expected valid scope");
|
||||||
|
|
||||||
|
Vals.push_back(DL.getLine());
|
||||||
|
Vals.push_back(DL.getCol());
|
||||||
|
Vals.push_back(VE.getMetadataOrNullID(Scope));
|
||||||
|
Vals.push_back(VE.getMetadataOrNullID(IA));
|
||||||
|
Stream.EmitRecord(bitc::FUNC_CODE_DEBUG_LOC, Vals);
|
||||||
|
Vals.clear();
|
||||||
|
|
||||||
|
LastDL = DL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Emit names for all the instructions etc.
|
// Emit names for all the instructions etc.
|
||||||
|
Reference in New Issue
Block a user