mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-19 01:13:25 +00:00
Add DISubprogram is not null check.
This fixes test/CodeGen//2009-01-21-invalid-debug-info.m test case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69210 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c23e496879
commit
8818b8f443
@ -357,11 +357,13 @@ bool FastISel::SelectCall(User *I) {
|
||||
if (DW && DW->ValidDebugInfo(REI->getContext(), true)) {
|
||||
unsigned ID = 0;
|
||||
DISubprogram Subprogram(cast<GlobalVariable>(REI->getContext()));
|
||||
if (!Subprogram.describes(MF.getFunction())) {
|
||||
if (!Subprogram.isNull() && !Subprogram.describes(MF.getFunction())) {
|
||||
// This is end of an inlined function.
|
||||
const TargetInstrDesc &II = TII.get(TargetInstrInfo::DBG_LABEL);
|
||||
ID = DW->RecordInlinedFnEnd(Subprogram);
|
||||
BuildMI(MBB, DL, II).addImm(ID);
|
||||
if (ID)
|
||||
// If ID is 0 then this was not an end of inlined region.
|
||||
BuildMI(MBB, DL, II).addImm(ID);
|
||||
} else {
|
||||
const TargetInstrDesc &II = TII.get(TargetInstrInfo::DBG_LABEL);
|
||||
ID = DW->RecordRegionEnd(cast<GlobalVariable>(REI->getContext()));
|
||||
|
Loading…
Reference in New Issue
Block a user