mirror of
https://github.com/RPCS3/llvm.git
synced 2024-11-27 21:50:29 +00:00
IRObject: Mark extern_weak as weak.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262222 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
cb7bae1ff0
commit
78ddd2d003
@ -231,7 +231,8 @@ uint32_t IRObjectFile::getSymbolFlags(DataRefImpl Symb) const {
|
||||
Res |= BasicSymbolRef::SF_Global;
|
||||
if (GV->hasCommonLinkage())
|
||||
Res |= BasicSymbolRef::SF_Common;
|
||||
if (GV->hasLinkOnceLinkage() || GV->hasWeakLinkage())
|
||||
if (GV->hasLinkOnceLinkage() || GV->hasWeakLinkage() ||
|
||||
GV->hasExternalWeakLinkage())
|
||||
Res |= BasicSymbolRef::SF_Weak;
|
||||
|
||||
if (GV->getName().startswith("llvm."))
|
||||
|
@ -6,6 +6,7 @@
|
||||
; CHECK-NEXT: t f2
|
||||
; CHECK-NEXT: W f3
|
||||
; CHECK-NEXT: U f4
|
||||
; CHECK-NEXT: w f5
|
||||
; CHECK-NEXT: D g1
|
||||
; CHECK-NEXT: d g2
|
||||
; CHECK-NEXT: C g3
|
||||
@ -31,6 +32,7 @@ module asm ".long undef_asm_sym"
|
||||
@a2 = internal alias i32, i32* @g1
|
||||
|
||||
define void @f1() {
|
||||
call void @f5()
|
||||
ret void
|
||||
}
|
||||
|
||||
@ -43,3 +45,5 @@ define linkonce_odr void @f3() {
|
||||
}
|
||||
|
||||
declare void @f4()
|
||||
|
||||
declare extern_weak void @f5()
|
||||
|
Loading…
Reference in New Issue
Block a user