Class LLVMOpInfoSymbol1

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<LLVMOpInfoSymbol1>
org.lwjgl.llvm.LLVMOpInfoSymbol1
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

public class LLVMOpInfoSymbol1 extends org.lwjgl.system.Struct<LLVMOpInfoSymbol1> implements org.lwjgl.system.NativeResource
The initial support in LLVM MC for the most general form of a relocatable expression is "AddSymbol - SubtractSymbol + Offset". For some Darwin targets this full form is encoded in the relocation information so that AddSymbol and SubtractSymbol can be link edited independent of each other. Many other platforms only allow a relocatable expression of the form AddSymbol + Offset to be encoded.

The LLVMOpInfoCallback() for the TagType value of 1 uses the struct LLVMOpInfo1. The value of the relocatable expression for the operand, including any PC adjustment, is passed in to the call back in the Value field. The symbolic information about the operand is returned using all the fields of the structure with the Offset of the relocatable expression returned in the Value field. It is possible that some symbols in the relocatable expression were assembly temporary symbols, for example "Ldata - LpicBase + constant", and only the Values of the symbols without symbol names are present in the relocation information. The VariantKind type is one of the Target specific #defines below and is used to print operands like "_foo GOT ", ":lower16:_foo", etc.

Layout


 struct LLVMOpInfoSymbol1 {
     uint64_t Present();
     char const * Name();
     uint64_t Value();
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • PRESENT

      public static final int PRESENT
      The struct member offsets.
    • NAME

      public static final int NAME
      The struct member offsets.
    • VALUE

      public static final int VALUE
      The struct member offsets.
  • Constructor Details

    • LLVMOpInfoSymbol1

      public LLVMOpInfoSymbol1(ByteBuffer container)
      Creates a LLVMOpInfoSymbol1 instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

      The created instance holds a strong reference to the container object.

  • Method Details

    • sizeof

      public int sizeof()
      Specified by:
      sizeof in class org.lwjgl.system.Struct<LLVMOpInfoSymbol1>
    • Present

      public long Present()
      1 if this symbol is present
    • Name

      public @Nullable ByteBuffer Name()
      symbol name if not NULL
    • NameString

      public @Nullable String NameString()
      symbol name if not NULL
    • Value

      public long Value()
      symbol value if name is NULL
    • Present

      public LLVMOpInfoSymbol1 Present(long value)
      Sets the specified value to the Present() field.
    • Name

      public LLVMOpInfoSymbol1 Name(@Nullable ByteBuffer value)
      Sets the address of the specified encoded string to the Name() field.
    • Value

      public LLVMOpInfoSymbol1 Value(long value)
      Sets the specified value to the Value() field.
    • set

      public LLVMOpInfoSymbol1 set(long Present, @Nullable ByteBuffer Name, long Value)
      Initializes this struct with the specified values.
    • set

      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

      public static LLVMOpInfoSymbol1 malloc()
      Returns a new LLVMOpInfoSymbol1 instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static LLVMOpInfoSymbol1 calloc()
      Returns a new LLVMOpInfoSymbol1 instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static LLVMOpInfoSymbol1 create()
      Returns a new LLVMOpInfoSymbol1 instance allocated with BufferUtils.
    • create

      public static LLVMOpInfoSymbol1 create(long address)
      Returns a new LLVMOpInfoSymbol1 instance for the specified memory address.
    • createSafe

      public static @Nullable LLVMOpInfoSymbol1 createSafe(long address)
      Like create, but returns null if address is NULL.
    • malloc

      public static LLVMOpInfoSymbol1.Buffer malloc(int capacity)
      Returns a new LLVMOpInfoSymbol1.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static LLVMOpInfoSymbol1.Buffer calloc(int capacity)
      Returns a new LLVMOpInfoSymbol1.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static LLVMOpInfoSymbol1.Buffer create(int capacity)
      Returns a new LLVMOpInfoSymbol1.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static LLVMOpInfoSymbol1.Buffer create(long address, int capacity)
      Create a LLVMOpInfoSymbol1.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      public static @Nullable LLVMOpInfoSymbol1.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • mallocStack

      @Deprecated public static LLVMOpInfoSymbol1 mallocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static LLVMOpInfoSymbol1 callocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static LLVMOpInfoSymbol1 mallocStack(org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static LLVMOpInfoSymbol1 callocStack(org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static LLVMOpInfoSymbol1.Buffer mallocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static LLVMOpInfoSymbol1.Buffer callocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • mallocStack

      @Deprecated public static LLVMOpInfoSymbol1.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static LLVMOpInfoSymbol1.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • malloc

      public static LLVMOpInfoSymbol1 malloc(org.lwjgl.system.MemoryStack stack)
      Returns a new LLVMOpInfoSymbol1 instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static LLVMOpInfoSymbol1 calloc(org.lwjgl.system.MemoryStack stack)
      Returns a new LLVMOpInfoSymbol1 instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

      public static LLVMOpInfoSymbol1.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new LLVMOpInfoSymbol1.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static LLVMOpInfoSymbol1.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new LLVMOpInfoSymbol1.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • nPresent

      public static long nPresent(long struct)
      Unsafe version of Present().
    • nName

      public static @Nullable ByteBuffer nName(long struct)
      Unsafe version of Name().
    • nNameString

      public static @Nullable String nNameString(long struct)
      Unsafe version of NameString().
    • nValue

      public static long nValue(long struct)
      Unsafe version of Value().
    • nPresent

      public static void nPresent(long struct, long value)
      Unsafe version of Present.
    • nName

      public static void nName(long struct, @Nullable ByteBuffer value)
      Unsafe version of Name.
    • nValue

      public static void nValue(long struct, long value)
      Unsafe version of Value.