Skip to content

Commit 842a332

Browse files
authored
[NVPTX] Fix DwarfFrameBase construction (llvm#101000)
The `{0}` here was initializing the first union member `Register`, rather than the union member used by CFA, which is `Offset`. Prior to llvm#99263 this was harmless, but now they have different layout, leading to test failures on some platforms (at least i686 and s390x).
1 parent cfb92be commit 842a332

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

llvm/lib/Target/NVPTX/NVPTXFrameLowering.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,5 +93,8 @@ MachineBasicBlock::iterator NVPTXFrameLowering::eliminateCallFramePseudoInstr(
9393

9494
TargetFrameLowering::DwarfFrameBase
9595
NVPTXFrameLowering::getDwarfFrameBase(const MachineFunction &MF) const {
96-
return {DwarfFrameBase::CFA, {0}};
96+
DwarfFrameBase FrameBase;
97+
FrameBase.Kind = DwarfFrameBase::CFA;
98+
FrameBase.Location.Offset = 0;
99+
return FrameBase;
97100
}

0 commit comments

Comments
 (0)