llvm.org GIT mirror llvm / 3d9fd99
Merging r142869: ------------------------------------------------------------------------ r142869 | void | 2011-10-24 16:05:43 -0700 (Mon, 24 Oct 2011) | 4 lines Check the visibility of the global variable before placing it into the stubs table. A hidden variable could potentially end up in both lists. <rdar://problem/10336715> ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_30@142870 91177308-0d34-0410-b5e6-96231b3b80d8 Bill Wendling 8 years ago
2 changed file(s) with 42 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
505505 // Add information about the stub reference to MachOMMI so that the stub
506506 // gets emitted by the asmprinter.
507507 MCSymbol *SSym = getContext().GetOrCreateSymbol(Name.str());
508 MachineModuleInfoImpl::StubValueTy &StubSym = MachOMMI.getGVStubEntry(SSym);
508 MachineModuleInfoImpl::StubValueTy &StubSym =
509 GV->hasHiddenVisibility() ? MachOMMI.getHiddenGVStubEntry(SSym) :
510 MachOMMI.getGVStubEntry(SSym);
509511 if (StubSym.getPointer() == 0) {
510512 MCSymbol *Sym = Mang->getSymbol(GV);
511513 StubSym = MachineModuleInfoImpl::StubValueTy(Sym, !GV->hasLocalLinkage());
533535 // Add information about the stub reference to MachOMMI so that the stub
534536 // gets emitted by the asmprinter.
535537 MCSymbol *SSym = getContext().GetOrCreateSymbol(Name.str());
536 MachineModuleInfoImpl::StubValueTy &StubSym = MachOMMI.getGVStubEntry(SSym);
538 MachineModuleInfoImpl::StubValueTy &StubSym =
539 GV->hasHiddenVisibility() ? MachOMMI.getHiddenGVStubEntry(SSym) :
540 MachOMMI.getGVStubEntry(SSym);
537541 if (StubSym.getPointer() == 0) {
538542 MCSymbol *Sym = Mang->getSymbol(GV);
539543 StubSym = MachineModuleInfoImpl::StubValueTy(Sym, !GV->hasLocalLinkage());
0 ; RUN: llc < %s -mtriple=thumbv7-apple-ios -relocation-model=pic
1 ;
2
3 @Exn = external hidden unnamed_addr constant { i8*, i8* }
4
5 define hidden void @func(i32* %this, i32* %e) optsize align 2 {
6 %e.ld = load i32* %e, align 4
7 %inv = invoke zeroext i1 @func2(i32* %this, i32 %e.ld) optsize
8 to label %ret unwind label %lpad
9
10 ret:
11 ret void
12
13 lpad:
14 %lp = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*)
15 catch i8* bitcast ({ i8*, i8* }* @Exn to i8*)
16 br label %.loopexit4
17
18 .loopexit4:
19 %exn = call i8* @__cxa_allocate_exception(i32 8) nounwind
20 call void @__cxa_throw(i8* %exn, i8* bitcast ({ i8*, i8* }* @Exn to i8*), i8* bitcast (void (i32*)* @dtor to i8*)) noreturn
21 unreachable
22
23 resume:
24 resume { i8*, i32 } %lp
25 }
26
27 declare hidden zeroext i1 @func2(i32*, i32) optsize align 2
28
29 declare i8* @__cxa_allocate_exception(i32)
30
31 declare i32 @__gxx_personality_sj0(...)
32
33 declare void @dtor(i32*) optsize
34
35 declare void @__cxa_throw(i8*, i8*, i8*)