diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2018-02-07 22:15:33 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2018-02-07 22:15:33 +0000 |
commit | 699f5d6bbc43fbd62e60f913379565bd86c6df8c (patch) | |
tree | d960a41f09b97d96b0eea7e8c5b7881b8bfa24a5 /clang/test/Driver/lanai-unknown-unknown.cpp | |
parent | 9bc04e98c5bd429cd49790ebf0a799c6a71427c5 (diff) | |
download | bcm5719-llvm-699f5d6bbc43fbd62e60f913379565bd86c6df8c.tar.gz bcm5719-llvm-699f5d6bbc43fbd62e60f913379565bd86c6df8c.zip |
Recommit r324107 again.
The difference from the previous try is that we no longer directly
access function declarations from position independent executables. It
should work, but currently doesn't with some linkers.
It now includes a fix to not mark available_externally definitions as
dso_local.
Original message:
Start setting dso_local in clang.
This starts adding dso_local to clang.
The hope is to eventually have TargetMachine::shouldAssumeDsoLocal go
away. My objective for now is to move enough of it to clang to remove
the need for the TargetMachine one to handle PIE copy relocations and
-fno-plt. With that it should then be easy to implement a
-fno-copy-reloc in clang.
This patch just adds the cases where we assume a symbol to be local
based on the file being compiled for an executable or a shared
library.
llvm-svn: 324535
Diffstat (limited to 'clang/test/Driver/lanai-unknown-unknown.cpp')
-rw-r--r-- | clang/test/Driver/lanai-unknown-unknown.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/clang/test/Driver/lanai-unknown-unknown.cpp b/clang/test/Driver/lanai-unknown-unknown.cpp index 5ce0adf9f3a..220a84f9eb2 100644 --- a/clang/test/Driver/lanai-unknown-unknown.cpp +++ b/clang/test/Driver/lanai-unknown-unknown.cpp @@ -11,25 +11,25 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t; extern "C" { -// CHECK: @align_c = global i32 1 +// CHECK: @align_c = dso_local global i32 1 int align_c = __alignof(char); -// CHECK: @align_s = global i32 2 +// CHECK: @align_s = dso_local global i32 2 int align_s = __alignof(short); -// CHECK: @align_i = global i32 4 +// CHECK: @align_i = dso_local global i32 4 int align_i = __alignof(int); -// CHECK: @align_l = global i32 4 +// CHECK: @align_l = dso_local global i32 4 int align_l = __alignof(long); -// CHECK: @align_ll = global i32 8 +// CHECK: @align_ll = dso_local global i32 8 int align_ll = __alignof(long long); -// CHECK: @align_p = global i32 4 +// CHECK: @align_p = dso_local global i32 4 int align_p = __alignof(void*); -// CHECK: @align_vl = global i32 4 +// CHECK: @align_vl = dso_local global i32 4 int align_vl = __alignof(va_list); // Check types |