From fd6194b3752f3d0f12d6884da5c0f7e445a84075 Mon Sep 17 00:00:00 2001 From: Vladimir Radosavljevic Date: Tue, 28 Jan 2025 13:26:59 +0100 Subject: [PATCH] [EVM] Update assert in EVMStackifyCodeEmitter::CodeEmitter::emitSymbol Update assert to reflect support for libraries. Signed-off-by: Vladimir Radosavljevic --- llvm/lib/Target/EVM/EVMStackifyCodeEmitter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/lib/Target/EVM/EVMStackifyCodeEmitter.cpp b/llvm/lib/Target/EVM/EVMStackifyCodeEmitter.cpp index addad590a46c..91a7e8abc9ac 100644 --- a/llvm/lib/Target/EVM/EVMStackifyCodeEmitter.cpp +++ b/llvm/lib/Target/EVM/EVMStackifyCodeEmitter.cpp @@ -120,8 +120,8 @@ void EVMStackifyCodeEmitter::CodeEmitter::emitConstant(uint64_t Val) { void EVMStackifyCodeEmitter::CodeEmitter::emitSymbol(const MachineInstr *MI, MCSymbol *Symbol) { unsigned Opc = MI->getOpcode(); - assert(Opc == EVM::DATASIZE || - Opc == EVM::DATAOFFSET && "Unexpected symbol instruction"); + assert(Opc == EVM::DATASIZE || Opc == EVM::DATAOFFSET || + Opc == EVM::LINKERSYMBOL && "Unexpected symbol instruction"); StackHeight += 1; // This is codegen-only instruction, that will be converted into PUSH4. auto NewMI = BuildMI(*CurMBB, CurMBB->end(), MI->getDebugLoc(),