OLD | NEW |
1 //===-- MObjectFileInfo.cpp - Object File Information ---------------------===// | 1 //===-- MObjectFileInfo.cpp - Object File Information ---------------------===// |
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/MCObjectFileInfo.h" | 10 #include "llvm/MC/MCObjectFileInfo.h" |
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
508 EHFrameSection = 0; // Created on demand. | 508 EHFrameSection = 0; // Created on demand. |
509 | 509 |
510 Triple T(TT); | 510 Triple T(TT); |
511 Triple::ArchType Arch = T.getArch(); | 511 Triple::ArchType Arch = T.getArch(); |
512 // FIXME: Checking for Arch here to filter out bogus triples such as | 512 // FIXME: Checking for Arch here to filter out bogus triples such as |
513 // cellspu-apple-darwin. Perhaps we should fix in Triple? | 513 // cellspu-apple-darwin. Perhaps we should fix in Triple? |
514 if ((Arch == Triple::x86 || Arch == Triple::x86_64 || | 514 if ((Arch == Triple::x86 || Arch == Triple::x86_64 || |
515 Arch == Triple::arm || Arch == Triple::thumb || | 515 Arch == Triple::arm || Arch == Triple::thumb || |
516 Arch == Triple::ppc || Arch == Triple::ppc64 || | 516 Arch == Triple::ppc || Arch == Triple::ppc64 || |
517 Arch == Triple::UnknownArch) && | 517 Arch == Triple::UnknownArch) && |
518 (T.isOSDarwin() || T.getEnvironment() == Triple::MachO)) { | 518 (T.isOSDarwin() || T.isEnvironmentMachO())) { |
519 Env = IsMachO; | 519 Env = IsMachO; |
520 InitMachOMCObjectFileInfo(T); | 520 InitMachOMCObjectFileInfo(T); |
521 } else if ((Arch == Triple::x86 || Arch == Triple::x86_64) && | 521 } else if ((Arch == Triple::x86 || Arch == Triple::x86_64) && |
522 (T.getOS() == Triple::MinGW32 || T.getOS() == Triple::Cygwin || | 522 T.isOSWindows()) { |
523 T.getOS() == Triple::Win32)) { | |
524 Env = IsCOFF; | 523 Env = IsCOFF; |
525 InitCOFFMCObjectFileInfo(T); | 524 InitCOFFMCObjectFileInfo(T); |
526 } else { | 525 } else { |
527 Env = IsELF; | 526 Env = IsELF; |
528 InitELFMCObjectFileInfo(T); | 527 InitELFMCObjectFileInfo(T); |
529 } | 528 } |
530 } | 529 } |
531 | 530 |
532 void MCObjectFileInfo::InitEHFrameSection() { | 531 void MCObjectFileInfo::InitEHFrameSection() { |
533 if (Env == IsMachO) | 532 if (Env == IsMachO) |
(...skipping 10 matching lines...) Expand all Loading... |
544 ELF::SHF_ALLOC, | 543 ELF::SHF_ALLOC, |
545 SectionKind::getDataRel()); | 544 SectionKind::getDataRel()); |
546 else | 545 else |
547 EHFrameSection = | 546 EHFrameSection = |
548 Ctx->getCOFFSection(".eh_frame", | 547 Ctx->getCOFFSection(".eh_frame", |
549 COFF::IMAGE_SCN_CNT_INITIALIZED_DATA | | 548 COFF::IMAGE_SCN_CNT_INITIALIZED_DATA | |
550 COFF::IMAGE_SCN_MEM_READ | | 549 COFF::IMAGE_SCN_MEM_READ | |
551 COFF::IMAGE_SCN_MEM_WRITE, | 550 COFF::IMAGE_SCN_MEM_WRITE, |
552 SectionKind::getDataRel()); | 551 SectionKind::getDataRel()); |
553 } | 552 } |
OLD | NEW |