summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4ade012)
raw | patch | inline | side by side (parent: 4ade012)
author | Rafael Espindola <rafael.espindola@gmail.com> | |
Wed, 14 Jan 2015 20:08:46 +0000 (20:08 +0000) | ||
committer | Rafael Espindola <rafael.espindola@gmail.com> | |
Wed, 14 Jan 2015 20:08:46 +0000 (20:08 +0000) |
In shared libraries the plugin can see non-weak declarations that are still
undefined.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226031 91177308-0d34-0410-b5e6-96231b3b80d8
undefined.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226031 91177308-0d34-0410-b5e6-96231b3b80d8
test/tools/gold/emit-llvm.ll | patch | blob | history | |
tools/gold/gold-plugin.cpp | patch | blob | history |
index 2d8516c54f67fb894b9ebbcc5e6a86b865865a0f..2c43147a2eabc9c235d802ff7f705ec3b222f807 100644 (file)
@g7 = extern_weak global i32
; CHECK-DAG: @g7 = extern_weak global i32
+@g8 = external global i32
+
; CHECK: define internal void @f1()
; OPT-NOT: @f1
define hidden void @f1() {
ret i32* @g7
}
+define i32* @f8() {
+ ret i32* @g8
+}
+
; API: f1 PREVAILING_DEF_IRONLY
; API: f2 PREVAILING_DEF_IRONLY
; API: f3 PREVAILING_DEF_IRONLY_EXP
; API: f5 PREVAILING_DEF_IRONLY_EXP
; API: f6 PREVAILING_DEF_IRONLY_EXP
; API: f7 PREVAILING_DEF_IRONLY_EXP
+; API: f8 PREVAILING_DEF_IRONLY_EXP
; API: g7 UNDEF
+; API: g8 UNDEF
; API: g5 PREVAILING_DEF_IRONLY_EXP
; API: g6 PREVAILING_DEF_IRONLY_EXP
index 4c21b38c1520b6c5e518bfd102fc405692144c02..5524bb9922c5d9400753884cb772ddc7eb8f2475 100644 (file)
@@ -633,7 +633,7 @@ getModuleForFile(LLVMContext &Context, claimed_file &F, raw_fd_ostream *ApiFile,
break;
case LDPR_UNDEF:
- if (!GV->hasExternalWeakLinkage()) {
+ if (!GV->isDeclarationForLinker()) {
assert(GV->hasComdat());
Drop.insert(GV);
}