LLVM API Documentation

MCFixupKindInfo.h
Go to the documentation of this file.
00001 //===-- llvm/MC/MCFixupKindInfo.h - Fixup Descriptors -----------*- C++ -*-===//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 
00010 #ifndef LLVM_MC_MCFIXUPKINDINFO_H
00011 #define LLVM_MC_MCFIXUPKINDINFO_H
00012 
00013 namespace llvm {
00014 
00015 /// MCFixupKindInfo - Target independent information on a fixup kind.
00016 struct MCFixupKindInfo {
00017   enum FixupKindFlags {
00018     /// Is this fixup kind PCrelative? This is used by the assembler backend to
00019     /// evaluate fixup values in a target independent manner when possible.
00020     FKF_IsPCRel = (1 << 0),
00021 
00022     /// Should this fixup kind force a 4-byte aligned effective PC value?
00023     FKF_IsAlignedDownTo32Bits = (1 << 1)
00024   };
00025 
00026   /// A target specific name for the fixup kind. The names will be unique for
00027   /// distinct kinds on any given target.
00028   const char *Name;
00029 
00030   /// The bit offset to write the relocation into.
00031   unsigned TargetOffset;
00032 
00033   /// The number of bits written by this fixup. The bits are assumed to be
00034   /// contiguous.
00035   unsigned TargetSize;
00036 
00037   /// Flags describing additional information on this fixup kind.
00038   unsigned Flags;
00039 };
00040 
00041 } // End llvm namespace
00042 
00043 #endif