-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make sure CodeGenTypes correctly reconverts function types. Fixes PR1…
…4355, a crash in IR generation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168112 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information
1 parent
6f9a445
commit 84fd6df
Showing
2 changed files
with
28 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm -o - %s | FileCheck %s | ||
|
||
// PR14355: don't crash | ||
// Keep this test in its own file because CodeGenTypes has global state. | ||
// CHECK: define void @test10_foo({}* %p1.coerce) nounwind { | ||
struct test10_B; | ||
typedef struct test10_B test10_F3(double); | ||
void test10_foo(test10_F3 p1); | ||
struct test10_B test10_b(double); | ||
void test10_bar() { | ||
test10_foo(test10_b); | ||
} | ||
struct test10_B {}; | ||
void test10_foo(test10_F3 p1) | ||
{ | ||
p1(0.0); | ||
} |