diff options
author | Chris Lattner <sabre@nondot.org> | 2011-07-10 03:47:27 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-07-10 03:47:27 +0000 |
commit | d1f1158203fb5f715c9e51c9adaca0f3838345cb (patch) | |
tree | f5e659ad8400a40219814501d224f829ffdb2cdb /clang/test/CodeGen/struct.c | |
parent | 1a5f8978e98759d47a69d03de67d9c516ce11f82 (diff) | |
download | bcm5719-llvm-d1f1158203fb5f715c9e51c9adaca0f3838345cb.tar.gz bcm5719-llvm-d1f1158203fb5f715c9e51c9adaca0f3838345cb.zip |
Fix the clang bootstrap and Jay's testcase from llvm-dev by being completely
conservative when converting a functiontype to IR when in a "pointer within
a struct" context. This has the unfortunate sideeffect of compiling all
function pointers inside of structs into "{}*" which, though correct, is
ugly. This has the positive side effect of being correct, and it is pretty
straight-forward to improve on this.
llvm-svn: 134861
Diffstat (limited to 'clang/test/CodeGen/struct.c')
-rw-r--r-- | clang/test/CodeGen/struct.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/test/CodeGen/struct.c b/clang/test/CodeGen/struct.c index 25477a052e8..e1739314d7f 100644 --- a/clang/test/CodeGen/struct.c +++ b/clang/test/CodeGen/struct.c @@ -181,3 +181,16 @@ range f18() { rangepair rp; return (rp = f18_ext()).range1; } + + + +// Complex forward reference of struct. +struct f19S; +extern struct f19T { + struct f19S (*p)(void); +} t; +struct f19S { int i; }; +void f19(void) { + t.p(); +} + |