mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-24 08:24:33 +00:00
Follow-up to r204790: don't try to emit line tables if there are no functions with DI in the TU
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204795 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -304,11 +304,18 @@ void WinCodeViewLineTables::beginFunction(const MachineFunction *MF) {
|
||||
}
|
||||
}
|
||||
|
||||
void WinCodeViewLineTables::endFunction(const MachineFunction *) {
|
||||
void WinCodeViewLineTables::endFunction(const MachineFunction *MF) {
|
||||
if (!Asm || !CurFn) // We haven't created any debug info for this function.
|
||||
return;
|
||||
|
||||
if (!CurFn->Instrs.empty()) {
|
||||
const Function *GV = MF->getFunction();
|
||||
assert(FnDebugInfo.count(GV) == true);
|
||||
assert(CurFn == &FnDebugInfo[GV]);
|
||||
|
||||
if (CurFn->Instrs.empty()) {
|
||||
FnDebugInfo.erase(GV);
|
||||
VisitedFunctions.pop_back();
|
||||
} else {
|
||||
// Define end label for subprogram.
|
||||
MCSymbol *FunctionEndSym = Asm->OutStreamer.getContext().CreateTempSymbol();
|
||||
Asm->OutStreamer.EmitLabel(FunctionEndSym);
|
||||
|
Reference in New Issue
Block a user