diff options
| author | Fariborz Jahanian <fjahanian@apple.com> | 2010-09-02 17:28:31 +0000 |
|---|---|---|
| committer | Fariborz Jahanian <fjahanian@apple.com> | 2010-09-02 17:28:31 +0000 |
| commit | 05bbef63b66047ce1b205d794acfa2c681f1f2e5 (patch) | |
| tree | 9ad9c820437e37a7eaa694592ff423c4419dd52e /clang | |
| parent | 5af02b03608530dd2c7c6dae75b8bfe936ec7eba (diff) | |
| download | bcm5719-llvm-05bbef63b66047ce1b205d794acfa2c681f1f2e5.tar.gz bcm5719-llvm-05bbef63b66047ce1b205d794acfa2c681f1f2e5.zip | |
Another i1 vs. i8 type mismatch issue. This time
a 'bool' byref variable in memory. Fixes radar 8382559.
llvm-svn: 112835
Diffstat (limited to 'clang')
| -rw-r--r-- | clang/lib/CodeGen/CGDecl.cpp | 2 | ||||
| -rw-r--r-- | clang/test/CodeGenCXX/reference-in-blocks.cpp | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGDecl.cpp b/clang/lib/CodeGen/CGDecl.cpp index 8ce196b64e8..d4c65e3e744 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); diff --git a/clang/test/CodeGenCXX/reference-in-blocks.cpp b/clang/test/CodeGenCXX/reference-in-blocks.cpp index 388ec7c4bbc..f08ef568802 100644 --- a/clang/test/CodeGenCXX/reference-in-blocks.cpp +++ b/clang/test/CodeGenCXX/reference-in-blocks.cpp @@ -41,3 +41,13 @@ int main() { a->F(); return 0; } + +// rdar://8382559 +namespace radar8382559 { + void func(bool& outHasProperty); + + void test() { + __attribute__((__blocks__(byref))) bool hasProperty = false; + func(hasProperty); + } +} |

