From 40d1a079f426e4dd1ff691cfdcefb1bf70ee2f18 Mon Sep 17 00:00:00 2001 From: wqz <1197460504@qq.com> Date: Fri, 16 Jun 2023 12:56:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3Argument=E7=B1=BB=E7=9A=84cla?= =?UTF-8?q?ssof=E5=87=BD=E6=95=B0=E7=9A=84=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/IR.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/IR.h b/src/IR.h index 7fbd998..17d122b 100644 --- a/src/IR.h +++ b/src/IR.h @@ -365,7 +365,7 @@ namespace sysy public: static bool classof(const Value *value) { - return value->getKind() == kConstant; + return value->getKind() == kArgument; } public: @@ -977,11 +977,11 @@ namespace sysy bool isConst; protected: - //******************Revised by lyq BEGIN*************************************** + //******************Revised by lyq BEGIN*************************************** GlobalValue(Module *parent, Type *type, const std::string &name, const std::vector &dims = {}, Value *init = nullptr, bool isconst = false) : User(kGlobal, type, name), parent(parent), hasInit(init), isConst(isconst) - //******************Revised by lyq END***************************************** + //******************Revised by lyq END***************************************** { assert(type->isPointer()); addOperands(dims); @@ -1000,7 +1000,7 @@ namespace sysy int getNumDims() const { return getNumOperands() - (hasInit ? 1 : 0); } Value *getDim(int index) { return getOperand(index); } //******************Revised by lyq BEGIN*************************************** - bool isconst() {return isConst; } + bool isconst() { return isConst; } //******************Revised by lyq END***************************************** public: void print(std::ostream &os) const override;