OLD | NEW |
1 //===-- X86AsmBackend.cpp - X86 Assembler Backend -------------------------===// | 1 //===-- X86AsmBackend.cpp - X86 Assembler Backend -------------------------===// |
2 // | 2 // |
3 // The LLVM Compiler Infrastructure | 3 // The LLVM Compiler Infrastructure |
4 // | 4 // |
5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
7 // | 7 // |
8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
9 | 9 |
10 #include "llvm/MC/MCAsmBackend.h" | 10 #include "llvm/MC/MCAsmBackend.h" |
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
436 return false; | 436 return false; |
437 } | 437 } |
438 } | 438 } |
439 }; | 439 }; |
440 | 440 |
441 } // end anonymous namespace | 441 } // end anonymous namespace |
442 | 442 |
443 MCAsmBackend *llvm::createX86_32AsmBackend(const Target &T, StringRef TT) { | 443 MCAsmBackend *llvm::createX86_32AsmBackend(const Target &T, StringRef TT) { |
444 Triple TheTriple(TT); | 444 Triple TheTriple(TT); |
445 | 445 |
446 if (TheTriple.isOSDarwin() || TheTriple.getEnvironment() == Triple::MachO) | 446 if (TheTriple.isOSDarwin() || TheTriple.isEnvironmentMachO()) |
447 return new DarwinX86_32AsmBackend(T); | 447 return new DarwinX86_32AsmBackend(T); |
448 | 448 |
449 if (TheTriple.isOSWindows()) | 449 if (TheTriple.isOSWindows()) |
450 return new WindowsX86AsmBackend(T, false); | 450 return new WindowsX86AsmBackend(T, false); |
451 | 451 |
452 return new ELFX86_32AsmBackend(T, TheTriple.getOS()); | 452 return new ELFX86_32AsmBackend(T, TheTriple.getOS()); |
453 } | 453 } |
454 | 454 |
455 MCAsmBackend *llvm::createX86_64AsmBackend(const Target &T, StringRef TT) { | 455 MCAsmBackend *llvm::createX86_64AsmBackend(const Target &T, StringRef TT) { |
456 Triple TheTriple(TT); | 456 Triple TheTriple(TT); |
457 | 457 |
458 if (TheTriple.isOSDarwin() || TheTriple.getEnvironment() == Triple::MachO) | 458 if (TheTriple.isOSDarwin() || TheTriple.isEnvironmentMachO()) |
459 return new DarwinX86_64AsmBackend(T); | 459 return new DarwinX86_64AsmBackend(T); |
460 | 460 |
461 if (TheTriple.isOSWindows()) | 461 if (TheTriple.isOSWindows()) |
462 return new WindowsX86AsmBackend(T, true); | 462 return new WindowsX86AsmBackend(T, true); |
463 | 463 |
464 return new ELFX86_64AsmBackend(T, TheTriple.getOS()); | 464 return new ELFX86_64AsmBackend(T, TheTriple.getOS()); |
465 } | 465 } |
OLD | NEW |