X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FTarget%2FTargetELFWriterInfo.h;h=5e48629cf4d6f1e6fa7415cf9ead4730551cb5a4;hb=b52ba9f8a896b6717d6395ad59f6550e1fa475b0;hp=ef3ca1c4fc4eeb05a87e90bdaa898122f4a4c3a4;hpb=0a38dc5fda9a22aceecccbad2f024b118ce1d5d8;p=oota-llvm.git diff --git a/include/llvm/Target/TargetELFWriterInfo.h b/include/llvm/Target/TargetELFWriterInfo.h index ef3ca1c4fc4..5e48629cf4d 100644 --- a/include/llvm/Target/TargetELFWriterInfo.h +++ b/include/llvm/Target/TargetELFWriterInfo.h @@ -15,9 +15,6 @@ #define LLVM_TARGET_TARGETELFWRITERINFO_H namespace llvm { - class Function; - class TargetData; - class TargetMachine; //===--------------------------------------------------------------------===// // TargetELFWriterInfo @@ -28,7 +25,6 @@ namespace llvm { // EMachine - This field is the target specific value to emit as the // e_machine member of the ELF header. unsigned short EMachine; - TargetMachine &TM; bool is64Bit, isLittleEndian; public: @@ -47,7 +43,8 @@ namespace llvm { EM_ARM = 40, // ARM EM_ALPHA = 41, // DEC Alpha EM_SPARCV9 = 43, // SPARC V9 - EM_X86_64 = 62 // AMD64 + EM_X86_64 = 62, // AMD64 + EM_HEXAGON = 164 // Qualcomm Hexagon }; // ELF File classes @@ -62,7 +59,7 @@ namespace llvm { ELFDATA2MSB = 2 // Big-endian object file }; - explicit TargetELFWriterInfo(TargetMachine &tm); + explicit TargetELFWriterInfo(bool is64Bit_, bool isLittleEndian_); virtual ~TargetELFWriterInfo(); unsigned short getEMachine() const { return EMachine; } @@ -89,14 +86,6 @@ namespace llvm { : (hasRelocationAddend() ? 12 : 8); } - /// hasCustomJumpTableIndexRelTy - Returns true if the target has a - /// specific relocation type for a jump table index. - virtual bool hasCustomJumpTableIndexRelTy() const { return false; } - - /// getJumpTableIndexRelTy - Returns the target specific relocation type - /// for a jump table index. - virtual unsigned getJumpTableIndexRelTy() const { return 0; } - /// getRelocationType - Returns the target specific ELF Relocation type. /// 'MachineRelTy' contains the object code independent relocation type virtual unsigned getRelocationType(unsigned MachineRelTy) const = 0; @@ -107,7 +96,8 @@ namespace llvm { /// getDefaultAddendForRelTy - Gets the default addend value for a /// relocation entry based on the target ELF relocation type. - virtual long int getDefaultAddendForRelTy(unsigned RelTy) const = 0; + virtual long int getDefaultAddendForRelTy(unsigned RelTy, + long int Modifier = 0) const = 0; /// getRelTySize - Returns the size of relocatable field in bits virtual unsigned getRelocationTySize(unsigned RelTy) const = 0; @@ -120,7 +110,7 @@ namespace llvm { virtual unsigned getAbsoluteLabelMachineRelTy() const = 0; /// computeRelocation - Some relocatable fields could be relocated - /// directly, avoiding the emission of a relocation symbol, compute the + /// directly, avoiding the relocation symbol emission, compute the /// final relocation value for this symbol. virtual long int computeRelocation(unsigned SymOffset, unsigned RelOffset, unsigned RelTy) const = 0;