mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-08 06:32:24 +00:00
Mirror how Fast ISel determines if a region.end intrinsic is the end of an
inlined function or the end of a function. Before, this was never executing the "inlined" version of the Record method. This will become important once the inlined Dwarf writer patch lands. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71268 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
728c7f3059
commit
6c4311dddb
@ -3928,29 +3928,26 @@ SelectionDAGLowering::visitIntrinsicCall(CallInst &I, unsigned Intrinsic) {
|
|||||||
DW && DW->ShouldEmitDwarfDebug()) {
|
DW && DW->ShouldEmitDwarfDebug()) {
|
||||||
MachineFunction &MF = DAG.getMachineFunction();
|
MachineFunction &MF = DAG.getMachineFunction();
|
||||||
DISubprogram Subprogram(cast<GlobalVariable>(REI.getContext()));
|
DISubprogram Subprogram(cast<GlobalVariable>(REI.getContext()));
|
||||||
std::string SPName;
|
|
||||||
Subprogram.getLinkageName(SPName);
|
if (Subprogram.isNull() || Subprogram.describes(MF.getFunction())) {
|
||||||
if (!SPName.empty()
|
unsigned LabelID =
|
||||||
&& strcmp(SPName.c_str(), MF.getFunction()->getNameStart())) {
|
DW->RecordRegionEnd(cast<GlobalVariable>(REI.getContext()));
|
||||||
// This is end of inlined function. Debugging information for
|
DAG.setRoot(DAG.getLabel(ISD::DBG_LABEL, getCurDebugLoc(),
|
||||||
// inlined function is not handled yet (only supported by FastISel).
|
getRoot(), LabelID));
|
||||||
|
} else {
|
||||||
|
// This is end of inlined function. Debugging information for inlined
|
||||||
|
// function is not handled yet (only supported by FastISel).
|
||||||
if (OptLevel == CodeGenOpt::None) {
|
if (OptLevel == CodeGenOpt::None) {
|
||||||
unsigned ID = DW->RecordInlinedFnEnd(Subprogram);
|
unsigned ID = DW->RecordInlinedFnEnd(Subprogram);
|
||||||
if (ID != 0)
|
if (ID != 0)
|
||||||
// Returned ID is 0 if this is unbalanced "end of inlined
|
// Returned ID is 0 if this is unbalanced "end of inlined
|
||||||
// scope". This could happen if optimizer eats dbg intrinsics
|
// scope". This could happen if optimizer eats dbg intrinsics or
|
||||||
// or "beginning of inlined scope" is not recoginized due to
|
// "beginning of inlined scope" is not recoginized due to missing
|
||||||
// missing location info. In such cases, do ignore this region.end.
|
// location info. In such cases, do ignore this region.end.
|
||||||
DAG.setRoot(DAG.getLabel(ISD::DBG_LABEL, getCurDebugLoc(),
|
DAG.setRoot(DAG.getLabel(ISD::DBG_LABEL, getCurDebugLoc(),
|
||||||
getRoot(), ID));
|
getRoot(), ID));
|
||||||
}
|
}
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned LabelID =
|
|
||||||
DW->RecordRegionEnd(cast<GlobalVariable>(REI.getContext()));
|
|
||||||
DAG.setRoot(DAG.getLabel(ISD::DBG_LABEL, getCurDebugLoc(),
|
|
||||||
getRoot(), LabelID));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user