diff --git a/clang/lib/CIR/CodeGen/CIRGenFunction.h b/clang/lib/CIR/CodeGen/CIRGenFunction.h index 17aa68492f983..0ca95625b313c 100644 --- a/clang/lib/CIR/CodeGen/CIRGenFunction.h +++ b/clang/lib/CIR/CodeGen/CIRGenFunction.h @@ -164,7 +164,7 @@ class CIRGenFunction : public CIRGenTypeCache { /// An abstract representation of regular/ObjC call/message targets. class AbstractCallee { /// The function declaration of the callee. - const clang::Decl *calleeDecl; + [[maybe_unused]] const clang::Decl *calleeDecl; public: AbstractCallee() : calleeDecl(nullptr) {} diff --git a/clang/lib/CIR/CodeGen/CIRGenModule.cpp b/clang/lib/CIR/CodeGen/CIRGenModule.cpp index 4b5acb36a9319..fd11523ebba61 100644 --- a/clang/lib/CIR/CodeGen/CIRGenModule.cpp +++ b/clang/lib/CIR/CodeGen/CIRGenModule.cpp @@ -262,6 +262,7 @@ CIRGenModule::getOrCreateCIRGlobal(StringRef mangledName, mlir::Type ty, } errorNYI(d->getSourceRange(), "reference of undeclared global"); + return {}; } cir::GlobalOp