summaryrefslogtreecommitdiff
path: root/test/Frontend/ast-codegen.c
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2018-02-07 22:15:33 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2018-02-07 22:15:33 +0000
commit19347d7065a90fecbe8efd7f9f48b91f0f1319e6 (patch)
treeeadb4566628040bf827557cee2d8c405942d9332 /test/Frontend/ast-codegen.c
parent0917b6d8c8400945667d897adc38d5a65381f727 (diff)
downloadclang-19347d7065a90fecbe8efd7f9f48b91f0f1319e6.tar.gz
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@324535 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Frontend/ast-codegen.c')
-rw-r--r--test/Frontend/ast-codegen.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/Frontend/ast-codegen.c b/test/Frontend/ast-codegen.c
index 4a3f8a3b79..e1140fdd8b 100644
--- a/test/Frontend/ast-codegen.c
+++ b/test/Frontend/ast-codegen.c
@@ -5,9 +5,9 @@
// CHECK: module asm "foo"
__asm__("foo");
-// CHECK: @g0 = common global i32 0, align 4
+// CHECK: @g0 = common dso_local global i32 0, align 4
int g0;
-// CHECK: define i32 @f0()
+// CHECK: define dso_local i32 @f0()
int f0() {
}