# HG changeset patch # User Shinji KONO # Date 1626645593 -32400 # Node ID c2fc9aeb158b41245e56338455b5bd35a66979e2 # Parent 21e6aa2e49efd547c4636ee1a3bf850a5e041ec6 ... diff -r 21e6aa2e49ef -r c2fc9aeb158b clang/lib/CodeGen/TargetInfo.cpp --- a/clang/lib/CodeGen/TargetInfo.cpp Mon Jul 19 06:57:16 2021 +0900 +++ b/clang/lib/CodeGen/TargetInfo.cpp Mon Jul 19 06:59:53 2021 +0900 @@ -8210,19 +8210,6 @@ return TargetCodeGenInfo::getGlobalVarAddressSpace(CGM, D); } - LangAS getGlobalVarAddressSpace(CodeGenModule &CGM, - const VarDecl *D) const override { - // Check if a global/static variable is defined within address space 1 - // but not constant. - LangAS AS = D->getType().getAddressSpace(); - if (isTargetAddressSpace(AS) && toTargetAddressSpace(AS) == 1 && - !D->getType().isConstQualified()) - CGM.getDiags().Report(D->getLocation(), - diag::err_verify_nonconst_addrspace) - << "__flash"; - return TargetCodeGenInfo::getGlobalVarAddressSpace(CGM, D); - } - void setTargetAttributes(const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &CGM) const override { if (GV->isDeclaration())