forked from OSchip/llvm-project
[COFF][CG Profile] set undefined symbol to external
Differential Revision: https://reviews.llvm.org/D88456
This commit is contained in:
parent
d2d7a44fac
commit
a9abe1f785
|
@ -340,10 +340,8 @@ void MCWinCOFFStreamer::finalizeCGProfileEntry(const MCSymbolRefExpr *&SRE) {
|
|||
const MCSymbol *S = &SRE->getSymbol();
|
||||
bool Created;
|
||||
getAssembler().registerSymbol(*S, &Created);
|
||||
if (Created) {
|
||||
cast<MCSymbolCOFF>(S)->setIsWeakExternal();
|
||||
if (Created)
|
||||
cast<MCSymbolCOFF>(S)->setExternal(true);
|
||||
}
|
||||
}
|
||||
|
||||
void MCWinCOFFStreamer::finalizeCGProfile() {
|
||||
|
|
|
@ -30,7 +30,7 @@ late3:
|
|||
# CHECK-NEXT: ]
|
||||
# CHECK-NEXT: SectionData (
|
||||
# CHECK-NEXT: 0000: 0A000000 0E000000 20000000 00000000
|
||||
# CHECK-NEXT: 0010: 11000000 0A000000 0B000000 00000000
|
||||
# CHECK-NEXT: 0010: 0F000000 0A000000 0B000000 00000000
|
||||
# CHECK-NEXT: 0020: 0B000000 0C000000 14000000 00000000
|
||||
# CHECK-NEXT: )
|
||||
|
||||
|
@ -68,37 +68,15 @@ late3:
|
|||
# CHECK-NEXT: Section: IMAGE_SYM_UNDEFINED
|
||||
# CHECK-NEXT: BaseType:
|
||||
# CHECK-NEXT: ComplexType:
|
||||
# CHECK-NEXT: StorageClass: WeakExternal
|
||||
# CHECK-NEXT: AuxSymbolCount: 1
|
||||
# CHECK-NEXT: AuxWeakExternal {
|
||||
# CHECK-NEXT: Linked: .weak.b.default.late
|
||||
# CHECK-NEXT: Search: Alias
|
||||
# CHECK-NEXT: }
|
||||
# CHECK: Name: .weak.b.default.late
|
||||
# CHECK-NEXT: Value:
|
||||
# CHECK-NEXT: Section: IMAGE_SYM_ABSOLUTE
|
||||
# CHECK-NEXT: BaseType:
|
||||
# CHECK-NEXT: ComplexType:
|
||||
# CHECK-NEXT: StorageClass: External
|
||||
# CHECK-NEXT: AuxSymbolCount: 0
|
||||
# CHECK-NEXT: AuxSymbolCount:
|
||||
# CHECK: Name: freq
|
||||
# CHECK-NEXT: Value:
|
||||
# CHECK-NEXT: Section: IMAGE_SYM_UNDEFINED
|
||||
# CHECK-NEXT: BaseType:
|
||||
# CHECK-NEXT: ComplexType:
|
||||
# CHECK-NEXT: StorageClass: WeakExternal
|
||||
# CHECK-NEXT: AuxSymbolCount: 1
|
||||
# CHECK-NEXT: AuxWeakExternal {
|
||||
# CHECK-NEXT: Linked: .weak.freq.default.late
|
||||
# CHECK-NEXT: Search: Alias
|
||||
# CHECK-NEXT: }
|
||||
# CHECK: Name: .weak.freq.default.late
|
||||
# CHECK-NEXT: Value:
|
||||
# CHECK-NEXT: Section: IMAGE_SYM_ABSOLUTE
|
||||
# CHECK-NEXT: BaseType:
|
||||
# CHECK-NEXT: ComplexType:
|
||||
# CHECK-NEXT: StorageClass: External
|
||||
# CHECK-NEXT: AuxSymbolCount: 0
|
||||
# CHECK-NEXT: AuxSymbolCount:
|
||||
|
||||
# CHECK: CGProfile [
|
||||
# CHECK-NEXT: CGProfileEntry {
|
||||
|
|
Loading…
Reference in New Issue