From 087206dbcd41a7c0b42ed4fa97c27cdc5781dcc0 Mon Sep 17 00:00:00 2001 From: Fariborz Jahanian Date: Fri, 3 Sep 2010 23:07:53 +0000 Subject: Truncate block variable of bool type to i1 when its value is used. This matches with non-block variable use of bool type. (Fixes radar 8390062). llvm-svn: 113027 --- clang/lib/CodeGen/CGDecl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/CodeGen/CGDecl.cpp') diff --git a/clang/lib/CodeGen/CGDecl.cpp b/clang/lib/CodeGen/CGDecl.cpp index 5017ce720cb..57e5236c67e 100644 --- a/clang/lib/CodeGen/CGDecl.cpp +++ b/clang/lib/CodeGen/CGDecl.cpp @@ -373,7 +373,7 @@ const llvm::Type *CodeGenFunction::BuildByRefType(const ValueDecl *D) { } // T x; - Types.push_back(ConvertType(Ty)); + Types.push_back(ConvertTypeForMem(Ty)); const llvm::Type *T = llvm::StructType::get(VMContext, Types, Packed); -- cgit v1.2.3