Class LLVMOpInfoSymbol1

  • All Implemented Interfaces:
    java.lang.AutoCloseable, NativeResource, Pointer

    public class LLVMOpInfoSymbol1
    extends Struct
    implements 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.

    Member documentation

    • Present – 1 if this symbol is present
    • Name – symbol name if not NULL
    • Value – symbol value if name is NULL

    Layout

    
     struct LLVMOpInfoSymbol1 {
         uint64_t Present;
         char const * Name;
         uint64_t Value;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • PRESENT, NAME, VALUE

        The struct member offsets.
    • Constructor Detail

      • LLVMOpInfoSymbol1

        public LLVMOpInfoSymbol1​(java.nio.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 Detail

      • sizeof

        public int sizeof()
        Description copied from class: Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class Struct
      • Present

        public long Present()
        Returns the value of the Present field.
      • Name

        @Nullable
        public java.nio.ByteBuffer Name()
        Returns a ByteBuffer view of the null-terminated string pointed to by the Name field.
      • NameString

        @Nullable
        public java.lang.String NameString()
        Decodes the null-terminated string pointed to by the Name field.
      • Value

        public long Value()
        Returns the value of the Value field.
      • Present

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

        public LLVMOpInfoSymbol1 Name​(@Nullable
                                      java.nio.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
                                     java.nio.ByteBuffer Name,
                                     long Value)
        Initializes this struct with the specified values.
      • 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​(long address)
        Returns a new LLVMOpInfoSymbol1 instance for the specified memory address.
      • createSafe

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

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

        public static LLVMOpInfoSymbol1 mallocStack()
        Returns a new LLVMOpInfoSymbol1 instance allocated on the thread-local MemoryStack.
      • callocStack

        public static LLVMOpInfoSymbol1 callocStack()
        Returns a new LLVMOpInfoSymbol1 instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      • mallocStack

        public static LLVMOpInfoSymbol1 mallocStack​(MemoryStack stack)
        Returns a new LLVMOpInfoSymbol1 instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
      • callocStack

        public static LLVMOpInfoSymbol1 callocStack​(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
      • nPresent

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

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

        @Nullable
        public static java.lang.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
                                 java.nio.ByteBuffer value)
        Unsafe version of Name.
      • nValue

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