mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-12 17:32:19 +00:00
llvm.dbg.func_start also defines beginning of function scope.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68727 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
29c0e3db62
commit
b396992f68
@ -370,17 +370,13 @@ bool FastISel::SelectCall(User *I) {
|
||||
unsigned SrcFile = DW->getOrCreateSourceID(CompileUnit.getDirectory(Dir),
|
||||
CompileUnit.getFilename(FN));
|
||||
|
||||
// Record the source line but does not create a label for the normal
|
||||
// function start. It will be emitted at asm emission time. However,
|
||||
// create a label if this is a beginning of inlined function.
|
||||
// Record the source line.
|
||||
unsigned Line = Subprogram.getLineNumber();
|
||||
unsigned LabelID = DW->RecordSourceLine(Line, 0, SrcFile);
|
||||
setCurDebugLoc(DebugLoc::get(MF.getOrCreateDebugLocID(SrcFile, Line, 0)));
|
||||
|
||||
if (DW->getRecordSourceLineCount() != 1) {
|
||||
const TargetInstrDesc &II = TII.get(TargetInstrInfo::DBG_LABEL);
|
||||
BuildMI(MBB, DL, II).addImm(LabelID);
|
||||
}
|
||||
// llvm.dbg.func_start also defines beginning of function scope.
|
||||
DW->RecordRegionStart(cast<GlobalVariable>(FSI->getSubprogram()));
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user