diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2019-06-07 19:10:08 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2019-06-07 19:10:08 +0000 |
commit | e08e68de213008246cc2dba029cdff0548693b2c (patch) | |
tree | 33b369e7293406ad72dd326410e4dd1608574747 /clang/test/CodeGenCXX/symbol-partition.cpp | |
parent | ef57e50bd2b8151e06a459432838610c172d0512 (diff) | |
download | bcm5719-llvm-e08e68de213008246cc2dba029cdff0548693b2c.tar.gz bcm5719-llvm-e08e68de213008246cc2dba029cdff0548693b2c.zip |
Driver, IRGen: Set partitions on GlobalValues according to -fsymbol-partition flag.
Differential Revision: https://reviews.llvm.org/D62636
llvm-svn: 362829
Diffstat (limited to 'clang/test/CodeGenCXX/symbol-partition.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/symbol-partition.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/symbol-partition.cpp b/clang/test/CodeGenCXX/symbol-partition.cpp new file mode 100644 index 00000000000..ecc58e2a847 --- /dev/null +++ b/clang/test/CodeGenCXX/symbol-partition.cpp @@ -0,0 +1,21 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux -fsymbol-partition=foo -emit-llvm -o - %s | FileCheck %s + +// CHECK: @gv = {{.*}}, partition "foo" +// CHECK: @_ZTV1S = {{.*}}, partition "foo" +// CHECK: @_ZTS1S = {{.*}}, partition "foo" +// CHECK: @_ZTI1S = {{.*}}, partition "foo" + +// CHECK: @_Z5ifuncv = {{.*}}, partition "foo" + +// CHECK: define {{.*}} @_ZN1S1fEv({{.*}} partition "foo" +// CHECK: define {{.*}} @f({{.*}} partition "foo" + +struct S { + virtual void f(); +}; + +void S::f() {} + +int gv; +extern "C" void *f() { return 0; } +void ifunc() __attribute__((ifunc("f"))); |