From 1fea06d6116249aadcd8d02127e506dd85d4e659 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Wed, 19 Jun 2013 06:58:20 +0000 Subject: [PATCH] Fix a warning. [-Wunused-variable] git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184284 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CodeGenModule.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index 18c56b0dae..3298d5a089 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/lib/CodeGen/CodeGenModule.cpp @@ -723,9 +723,9 @@ void CodeGenModule::SetFunctionAttributes(GlobalDecl GD, SetLLVMFunctionAttributes(FD, getTypes().arrangeGlobalDeclaration(GD), F); if (getCXXABI().HasThisReturn(GD)) { - llvm::Type *RetTy = F->getReturnType(); assert(!F->arg_empty() && - F->arg_begin()->getType()->canLosslesslyBitCastTo(RetTy) && + F->arg_begin()->getType() + ->canLosslesslyBitCastTo(F->getReturnType()) && "unexpected this return"); F->addAttribute(1, llvm::Attribute::Returned); } -- 2.40.0