llvm.org GIT mirror llvm / 2cf711f
Target/X86: Eliminate uses of getDarwinVers(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129813 91177308-0d34-0410-b5e6-96231b3b80d8 Daniel Dunbar 9 years ago
4 changed file(s) with 7 addition(s) and 11 deletion(s). Raw diff Collapse all Expand all
17721772 OpFlags = X86II::MO_PLT;
17731773 } else if (Subtarget->isPICStyleStubAny() &&
17741774 (GV->isDeclaration() || GV->isWeakForLinker()) &&
1775 Subtarget->getDarwinVers() < 9) {
1775 (!Subtarget->getTargetTriple().isOSX() ||
1776 Subtarget->getTargetTriple().isOSXVersionLT(10, 5))) {
17761777 // PC-relative references to external symbols should go through $stub,
17771778 // unless we're building with the leopard linker or later, which
17781779 // automatically synthesizes these stubs.
22802280 OpFlags = X86II::MO_PLT;
22812281 } else if (Subtarget->isPICStyleStubAny() &&
22822282 (GV->isDeclaration() || GV->isWeakForLinker()) &&
2283 Subtarget->getDarwinVers() < 9) {
2283 (!Subtarget->getTargetTriple().isOSX() ||
2284 Subtarget->getTargetTriple().isOSXVersionLT(10, 5))) {
22842285 // PC-relative references to external symbols should go through $stub,
22852286 // unless we're building with the leopard linker or later, which
22862287 // automatically synthesizes these stubs.
22992300 getTargetMachine().getRelocationModel() == Reloc::PIC_) {
23002301 OpFlags = X86II::MO_PLT;
23012302 } else if (Subtarget->isPICStyleStubAny() &&
2302 Subtarget->getDarwinVers() < 9) {
2303 (!Subtarget->getTargetTriple().isOSX() ||
2304 Subtarget->getTargetTriple().isOSXVersionLT(10, 5))) {
23032305 // PC-relative references to external symbols should go through $stub,
23042306 // unless we're building with the leopard linker or later, which
23052307 // automatically synthesizes these stubs.
143143 /// passed as the second argument. Otherwise it returns null.
144144 const char *X86Subtarget::getBZeroEntry() const {
145145 // Darwin 10 has a __bzero entry point for this purpose.
146 if (getDarwinVers() >= 10)
146 if (getTargetTriple().isOSX() && !getTargetTriple().isOSXVersionLT(10, 6))
147147 return "__bzero";
148148
149149 return 0;
216216 return PICStyle == PICStyles::StubDynamicNoPIC ||
217217 PICStyle == PICStyles::StubPIC; }
218218
219 /// getDarwinVers - Return the darwin version number, 8 = Tiger, 9 = Leopard,
220 /// 10 = Snow Leopard, etc.
221 unsigned getDarwinVers() const {
222 if (isTargetDarwin()) return TargetTriple.getDarwinMajorNumber();
223 return 0;
224 }
225
226219 /// ClassifyGlobalReference - Classify a global variable reference for the
227220 /// current subtarget according to how we should reference it in a non-pcrel
228221 /// context.