fix firstnode of uninitial ins

Signed-off-by: zhangrengao <zhangrengao1@huawei.com>
Change-Id: I4d757438e57fe825ff9c7ab79c3f6f408e924033
This commit is contained in:
zhangrengao
2022-05-06 21:33:55 +08:00
parent 234e8d7474
commit a641b304d6
+6 -1
View File
@@ -193,6 +193,11 @@ export class DebugInfo {
}
}
public static setInvalidPosInfoForUninitializeIns(posInfo: DebugPosInfo, pandaGen: PandaGen) {
posInfo.setSourecLineNum(-1);
posInfo.setSourecColumnNum(-1);
}
public static addScope(scope: Scope) {
DebugInfo.scopeArray.push(scope);
}
@@ -277,7 +282,7 @@ export class DebugInfo {
// count pos offset
for (let i = 0; i < insns.length; i++) {
if (insns[i].debugPosInfo.getDebugPosInfoNodeState() == NodeKind.FirstNodeOfFunction) {
DebugInfo.setPosInfoForUninitializeIns(insns[i].debugPosInfo, pandaGen);
DebugInfo.setInvalidPosInfoForUninitializeIns(insns[i].debugPosInfo, pandaGen);
}
let insLength = DebugInfo.getIRNodeWholeLength(insns[i]);