diff options
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp')
-rw-r--r-- | llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp index f139e87..a91fa74 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp +++ b/llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp @@ -314,6 +314,16 @@ void WebAssemblyFrameLowering::emitEpilogue(MachineFunction &MF, writeSPToGlobal(SPReg, MF, MBB, InsertPt, DL); } +bool WebAssemblyFrameLowering::isSupportedStackID( + TargetStackID::Value ID) const { + // Use the Object stack for WebAssembly locals which can only be accessed + // by name, not via an address in linear memory. + if (ID == TargetStackID::WasmLocal) + return true; + + return TargetFrameLowering::isSupportedStackID(ID); +} + TargetFrameLowering::DwarfFrameBase WebAssemblyFrameLowering::getDwarfFrameBase(const MachineFunction &MF) const { DwarfFrameBase Loc; |