LLVM  6.0.0svn
Macros | Enumerations | Functions
WinCOFFObjectWriter.cpp File Reference
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Twine.h"
#include "llvm/BinaryFormat/COFF.h"
#include "llvm/MC/MCAsmLayout.h"
#include "llvm/MC/MCAssembler.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCExpr.h"
#include "llvm/MC/MCFixup.h"
#include "llvm/MC/MCFragment.h"
#include "llvm/MC/MCObjectWriter.h"
#include "llvm/MC/MCSection.h"
#include "llvm/MC/MCSectionCOFF.h"
#include "llvm/MC/MCSymbol.h"
#include "llvm/MC/MCSymbolCOFF.h"
#include "llvm/MC/MCValue.h"
#include "llvm/MC/MCWinCOFFObjectWriter.h"
#include "llvm/MC/StringTableBuilder.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/Endian.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/JamCRC.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <cstring>
#include <ctime>
#include <memory>
#include <string>
#include <vector>
Include dependency graph for WinCOFFObjectWriter.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "WinCOFFObjectWriter"
 

Enumerations

enum  AuxiliaryType
 
enum  : unsigned { Max7DecimalOffset = 9999999U }
 
enum  : uint64_t { MaxBase64Offset = 0xFFFFFFFFFULL }
 

Functions

static uint32_t getAlignment (const MCSectionCOFF &Sec)
 
static uint64_t getSymbolValue (const MCSymbol &Symbol, const MCAsmLayout &Layout)
 
static void encodeBase64StringEntry (char *Buffer, uint64_t Value)
 
static std::time_t getTime ()
 
static bool isAssociative (const COFFSection &Section)
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "WinCOFFObjectWriter"

Definition at line 54 of file WinCOFFObjectWriter.cpp.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum : unsigned
Enumerator
Max7DecimalOffset 

Definition at line 411 of file WinCOFFObjectWriter.cpp.

◆ anonymous enum

anonymous enum : uint64_t
Enumerator
MaxBase64Offset 

Definition at line 412 of file WinCOFFObjectWriter.cpp.

◆ AuxiliaryType

Definition at line 60 of file WinCOFFObjectWriter.cpp.

Function Documentation

◆ encodeBase64StringEntry()

static void encodeBase64StringEntry ( char Buffer,
uint64_t  Value 
)
static

Definition at line 417 of file WinCOFFObjectWriter.cpp.

References llvm::HexStyle::Asm, assert(), B, llvm::COFF::BigObjMagic, llvm::COFF::header::Characteristics, llvm::COFF::section::Characteristics, llvm::Twine::concat(), llvm::SmallVectorTemplateCommon< T >::data(), Fixup, llvm::FK_SecRel_2, llvm::MCAssembler::getBackend(), llvm::MCValue::getConstant(), llvm::MCAssembler::getContext(), llvm::JamCRC::getCRC(), llvm::MCSymbol::getFragment(), llvm::MCAsmLayout::getFragmentOffset(), llvm::MCFixup::getLoc(), llvm::MCSymbol::getName(), llvm::MCFixup::getOffset(), llvm::MCFragment::getParent(), llvm::MCValue::getSymA(), llvm::MCValue::getSymB(), llvm::MCSymbolRefExpr::getSymbol(), llvm::MCAsmLayout::getSymbolOffset(), getType(), llvm::COFF::IMAGE_FILE_MACHINE_AMD64, llvm::COFF::IMAGE_FILE_MACHINE_ARMNT, llvm::COFF::IMAGE_FILE_MACHINE_I386, llvm::COFF::IMAGE_FILE_MACHINE_UNKNOWN, llvm::COFF::IMAGE_REL_AMD64_REL32, llvm::COFF::IMAGE_REL_ARM_ABSOLUTE, llvm::COFF::IMAGE_REL_ARM_ADDR32, llvm::COFF::IMAGE_REL_ARM_ADDR32NB, llvm::COFF::IMAGE_REL_ARM_BLX11, llvm::COFF::IMAGE_REL_ARM_BLX23T, llvm::COFF::IMAGE_REL_ARM_BLX24, llvm::COFF::IMAGE_REL_ARM_BRANCH11, llvm::COFF::IMAGE_REL_ARM_BRANCH20T, llvm::COFF::IMAGE_REL_ARM_BRANCH24, llvm::COFF::IMAGE_REL_ARM_BRANCH24T, llvm::COFF::IMAGE_REL_ARM_MOV32A, llvm::COFF::IMAGE_REL_ARM_MOV32T, llvm::COFF::IMAGE_REL_ARM_SECREL, llvm::COFF::IMAGE_REL_ARM_SECTION, llvm::COFF::IMAGE_REL_ARM_TOKEN, llvm::COFF::IMAGE_REL_I386_REL32, llvm::COFF::IMAGE_SCN_CNT_UNINITIALIZED_DATA, llvm::COFF::IMAGE_SCN_LNK_NRELOC_OVFL, llvm::COFF::IMAGE_SYM_DTYPE_FUNCTION, llvm::MCAssembler::isIncrementalLinkerCompatible(), llvm::MCObjectWriter::isSymbolRefDifferenceFullyResolvedImpl(), llvm::MCSymbol::isTemporary(), llvm_unreachable, llvm::COFF::header::Machine, Max7DecimalOffset, MaxBase64Offset, llvm::COFF::BigObjHeader::MinBigObjectVersion, llvm::COFF::section::Name, llvm::COFF::NameSize, llvm::COFF::section::NumberOfLineNumbers, llvm::COFF::section::NumberOfRelocations, llvm::COFF::header::NumberOfSections, llvm::COFF::header::NumberOfSymbols, llvm::COFF::section::PointerToLineNumbers, llvm::COFF::section::PointerToRawData, llvm::COFF::section::PointerToRelocations, llvm::COFF::header::PointerToSymbolTable, llvm::report_fatal_error(), llvm::MCContext::reportError(), llvm::COFF::SCT_COMPLEX_TYPE_SHIFT, llvm::ARMBuildAttrs::Section, llvm::SmallVectorTemplateCommon< T >::size(), llvm::SmallVectorTemplateCommon< T, typename >::size(), llvm::COFF::header::SizeOfOptionalHeader, llvm::COFF::section::SizeOfRawData, llvm::parallel::sort(), llvm::COFF::Symbol16Size, llvm::COFF::Symbol32Size, llvm::COFF::relocation::SymbolTableIndex, llvm::COFF::header::TimeDateStamp, llvm::Twine::toVector(), llvm::COFF::relocation::Type, llvm::JamCRC::update(), llvm::COFF::section::VirtualAddress, llvm::COFF::relocation::VirtualAddress, llvm::COFF::section::VirtualSize, and llvm::MCAssembler::writeSectionData().

◆ getAlignment()

static uint32_t getAlignment ( const MCSectionCOFF Sec)
static

Definition at line 249 of file WinCOFFObjectWriter.cpp.

References llvm::MCSection::getAlignment(), llvm::MCSectionCOFF::getCharacteristics(), llvm::MCSectionCOFF::getCOMDATSymbol(), llvm::MCSectionCOFF::getSectionName(), llvm::MCSectionCOFF::getSelection(), llvm::COFF::IMAGE_COMDAT_SELECT_ASSOCIATIVE, llvm::COFF::IMAGE_SCN_ALIGN_1024BYTES, llvm::COFF::IMAGE_SCN_ALIGN_128BYTES, llvm::COFF::IMAGE_SCN_ALIGN_16BYTES, llvm::COFF::IMAGE_SCN_ALIGN_1BYTES, llvm::COFF::IMAGE_SCN_ALIGN_2048BYTES, llvm::COFF::IMAGE_SCN_ALIGN_256BYTES, llvm::COFF::IMAGE_SCN_ALIGN_2BYTES, llvm::COFF::IMAGE_SCN_ALIGN_32BYTES, llvm::COFF::IMAGE_SCN_ALIGN_4096BYTES, llvm::COFF::IMAGE_SCN_ALIGN_4BYTES, llvm::COFF::IMAGE_SCN_ALIGN_512BYTES, llvm::COFF::IMAGE_SCN_ALIGN_64BYTES, llvm::COFF::IMAGE_SCN_ALIGN_8192BYTES, llvm::COFF::IMAGE_SCN_ALIGN_8BYTES, llvm::COFF::IMAGE_SYM_CLASS_STATIC, llvm_unreachable, llvm::report_fatal_error(), llvm::ARMBuildAttrs::Section, and llvm::ARMBuildAttrs::Symbol.

Referenced by llvm::InnerLoopVectorizer::addMetadata(), canFoldInAddressingMode(), llvm::slpvectorizer::BoUpSLP::canMapToVector(), llvm::AllocaInst::cloneImpl(), llvm::LoadInst::cloneImpl(), llvm::StoreInst::cloneImpl(), llvm::FunctionComparator::cmpOperations(), combineShuffleOfSplat(), emitSignedInt64(), ExpandBVWithShuffles(), llvm::X86InstrInfo::foldMemoryOperandImpl(), getExpandedMinMaxOps(), llvm::MipsDAGToDAGISel::getGlobalBaseReg(), getMemInstAlignment(), llvm::ARMBaseInstrInfo::getNumMicroOps(), llvm::ARMBaseInstrInfo::getOperandLatency(), llvm::MachineMemOperand::getSize(), llvm::AttributeSetNode::hasAttributes(), haveSameSpecialState(), isAtomic(), IsSafeAndProfitableToMove(), lowerBuildVectorAsBroadcast(), propagateMetadata(), llvm::GVNHoist::rank(), RewriteP2Align(), llvm::object::SymbolRef::SymbolRef(), useSinCos(), and VerifyLowRegs().

◆ getSymbolValue()

static uint64_t getSymbolValue ( const MCSymbol Symbol,
const MCAsmLayout Layout 
)
static

◆ getTime()

static std::time_t getTime ( )
static

◆ isAssociative()

static bool isAssociative ( const COFFSection &  Section)
static