mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-04 10:30:01 +00:00
Fix handling of extern_weak. This was broken by r225983.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226026 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5e8cd99f55
commit
55c86a8cdc
@ -21,6 +21,9 @@
|
||||
|
||||
target triple = "x86_64-unknown-linux-gnu"
|
||||
|
||||
@g7 = extern_weak global i32
|
||||
; CHECK-DAG: @g7 = extern_weak global i32
|
||||
|
||||
; CHECK: define internal void @f1()
|
||||
; OPT-NOT: @f1
|
||||
define hidden void @f1() {
|
||||
@ -62,6 +65,9 @@ define linkonce_odr void @f6() unnamed_addr {
|
||||
}
|
||||
@g6 = global void()* @f6
|
||||
|
||||
define i32* @f7() {
|
||||
ret i32* @g7
|
||||
}
|
||||
|
||||
; API: f1 PREVAILING_DEF_IRONLY
|
||||
; API: f2 PREVAILING_DEF_IRONLY
|
||||
@ -69,5 +75,7 @@ define linkonce_odr void @f6() unnamed_addr {
|
||||
; API: f4 PREVAILING_DEF_IRONLY_EXP
|
||||
; API: f5 PREVAILING_DEF_IRONLY_EXP
|
||||
; API: f6 PREVAILING_DEF_IRONLY_EXP
|
||||
; API: f7 PREVAILING_DEF_IRONLY_EXP
|
||||
; API: g7 UNDEF
|
||||
; API: g5 PREVAILING_DEF_IRONLY_EXP
|
||||
; API: g6 PREVAILING_DEF_IRONLY_EXP
|
||||
|
@ -633,8 +633,10 @@ getModuleForFile(LLVMContext &Context, claimed_file &F, raw_fd_ostream *ApiFile,
|
||||
break;
|
||||
|
||||
case LDPR_UNDEF:
|
||||
assert(GV->hasComdat());
|
||||
Drop.insert(GV);
|
||||
if (!GV->hasExternalWeakLinkage()) {
|
||||
assert(GV->hasComdat());
|
||||
Drop.insert(GV);
|
||||
}
|
||||
break;
|
||||
|
||||
case LDPR_PREVAILING_DEF_IRONLY: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user