[cfe-commits] r112835 - in /cfe/trunk: lib/CodeGen/CGDecl.cpp test/CodeGenCXX/reference-in-blocks.cpp
Fariborz Jahanian
fjahanian at apple.com
Thu Sep 2 10:28:31 PDT 2010
Author: fjahanian
Date: Thu Sep 2 12:28:31 2010
New Revision: 112835
URL: http://llvm.org/viewvc/llvm-project?rev=112835&view=rev
Log:
Another i1 vs. i8 type mismatch issue. This time
a 'bool' byref variable in memory. Fixes radar 8382559.
Modified:
cfe/trunk/lib/CodeGen/CGDecl.cpp
cfe/trunk/test/CodeGenCXX/reference-in-blocks.cpp
Modified: cfe/trunk/lib/CodeGen/CGDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDecl.cpp?rev=112835&r1=112834&r2=112835&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDecl.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDecl.cpp Thu Sep 2 12:28:31 2010
@@ -373,7 +373,7 @@
}
// T x;
- Types.push_back(ConvertType(Ty));
+ Types.push_back(ConvertTypeForMem(Ty));
const llvm::Type *T = llvm::StructType::get(VMContext, Types, Packed);
Modified: cfe/trunk/test/CodeGenCXX/reference-in-blocks.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/reference-in-blocks.cpp?rev=112835&r1=112834&r2=112835&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/reference-in-blocks.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/reference-in-blocks.cpp Thu Sep 2 12:28:31 2010
@@ -41,3 +41,13 @@
a->F();
return 0;
}
+
+// rdar://8382559
+namespace radar8382559 {
+ void func(bool& outHasProperty);
+
+ void test() {
+ __attribute__((__blocks__(byref))) bool hasProperty = false;
+ func(hasProperty);
+ }
+}
More information about the cfe-commits
mailing list