From 2abf493974be068c3776accf50bca50374932b47 Mon Sep 17 00:00:00 2001 From: google-yfyang Date: Mon, 1 Dec 2025 16:30:34 -0500 Subject: [PATCH] Fix an unused variable error when compiled with optimization --- clang/lib/CodeGen/CGCUDARuntime.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clang/lib/CodeGen/CGCUDARuntime.cpp b/clang/lib/CodeGen/CGCUDARuntime.cpp index 9cbdb641d00a1..9c831b26c3a7b 100644 --- a/clang/lib/CodeGen/CGCUDARuntime.cpp +++ b/clang/lib/CodeGen/CGCUDARuntime.cpp @@ -62,8 +62,8 @@ static llvm::Value *emitGetParamBuf(CodeGenFunction &CGF, RValue CGCUDARuntime::EmitCUDADeviceKernelCallExpr( CodeGenFunction &CGF, const CUDAKernelCallExpr *E, ReturnValueSlot ReturnValue, llvm::CallBase **CallOrInvoke) { - ASTContext &Ctx = CGM.getContext(); - assert(Ctx.getcudaLaunchDeviceDecl() == E->getConfig()->getDirectCallee()); + assert(CGM.getContext().getcudaLaunchDeviceDecl() == + E->getConfig()->getDirectCallee()); llvm::BasicBlock *ConfigOKBlock = CGF.createBasicBlock("dkcall.configok"); llvm::BasicBlock *ContBlock = CGF.createBasicBlock("dkcall.end");