diff options
| author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2014-05-20 19:04:31 +0000 |
|---|---|---|
| committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2014-05-20 19:04:31 +0000 |
| commit | d22b97c30ba2f2fbff8eddd6a041fab2a4f57f2f (patch) | |
| tree | 8dff7e2a41b4761316f2f23d97393e3575423d0e | |
| parent | e432c510dc017b875ce134764e270a9963f24985 (diff) | |
| download | bcm5719-llvm-d22b97c30ba2f2fbff8eddd6a041fab2a4f57f2f.tar.gz bcm5719-llvm-d22b97c30ba2f2fbff8eddd6a041fab2a4f57f2f.zip | |
GlobalValue: Testcase for hidden visibility and local linkage
This is a testcase for r209227, a change in LLVM that automatically sets
visibility to default when the linkage is changed to local (rather than
asserting).
What this testcase triggers is hard to reproduce otherwise: the
`GlobalValue` is created (with non-local linkage), the visibility is set
to hidden, and then the linkage is set to local.
PR19760
llvm-svn: 209228
| -rw-r--r-- | clang/test/CodeGen/hidden-alias-to-internal-function.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/test/CodeGen/hidden-alias-to-internal-function.c b/clang/test/CodeGen/hidden-alias-to-internal-function.c new file mode 100644 index 00000000000..37e37659d70 --- /dev/null +++ b/clang/test/CodeGen/hidden-alias-to-internal-function.c @@ -0,0 +1,8 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-obj -o - -x c %s +// Reproduce the crash in PR19760. +static void foo(void) {} +void bar(void) __attribute__((alias("foo"))) +__attribute__((visibility("hidden"))); + +// CHECK: @bar = hidden alias void ()* @foo +// CHECK: define internal void @foo() |

