LLVM  mainline
Functions
Composite Constants
Constants

Functions in this group operate on composite constants. More...

Collaboration diagram for Composite Constants:

Functions

LLVMValueRef LLVMConstStringInContext (LLVMContextRef C, const char *Str, unsigned Length, LLVMBool DontNullTerminate)
 Create a ConstantDataSequential and initialize it with a string.
LLVMValueRef LLVMConstString (const char *Str, unsigned Length, LLVMBool DontNullTerminate)
 Create a ConstantDataSequential with string content in the global context.
LLVMBool LLVMIsConstantString (LLVMValueRef c)
 Returns true if the specified constant is an array of i8.
const char * LLVMGetAsString (LLVMValueRef c, size_t *out)
 Get the given constant data sequential as a string.
LLVMValueRef LLVMConstStructInContext (LLVMContextRef C, LLVMValueRef *ConstantVals, unsigned Count, LLVMBool Packed)
 Create an anonymous ConstantStruct with the specified values.
LLVMValueRef LLVMConstStruct (LLVMValueRef *ConstantVals, unsigned Count, LLVMBool Packed)
 Create a ConstantStruct in the global Context.
LLVMValueRef LLVMConstArray (LLVMTypeRef ElementTy, LLVMValueRef *ConstantVals, unsigned Length)
 Create a ConstantArray from values.
LLVMValueRef LLVMConstNamedStruct (LLVMTypeRef StructTy, LLVMValueRef *ConstantVals, unsigned Count)
 Create a non-anonymous ConstantStruct from values.
LLVMValueRef LLVMGetElementAsConstant (LLVMValueRef c, unsigned idx)
 Get an element at specified index as a constant.
LLVMValueRef LLVMConstVector (LLVMValueRef *ScalarConstantVals, unsigned Size)
 Create a ConstantVector from values.

Detailed Description

Functions in this group operate on composite constants.


Function Documentation

LLVMValueRef LLVMConstArray ( LLVMTypeRef  ElementTy,
LLVMValueRef ConstantVals,
unsigned  Length 
)

Create a ConstantArray from values.

See also:
llvm::ConstantArray::get()

Definition at line 934 of file Core.cpp.

References llvm::ArrayType::get(), llvm::ConstantArray::get(), llvm::unwrap(), and llvm::wrap().

LLVMValueRef LLVMConstNamedStruct ( LLVMTypeRef  StructTy,
LLVMValueRef ConstantVals,
unsigned  Count 
)

Create a non-anonymous ConstantStruct from values.

See also:
llvm::ConstantStruct::get()

Definition at line 946 of file Core.cpp.

References llvm::ConstantStruct::get(), llvm::makeArrayRef(), llvm::unwrap(), and llvm::wrap().

LLVMValueRef LLVMConstString ( const char *  Str,
unsigned  Length,
LLVMBool  DontNullTerminate 
)

Create a ConstantDataSequential with string content in the global context.

This is the same as LLVMConstStringInContext except it operates on the global context.

See also:
LLVMConstStringInContext()
llvm::ConstantDataArray::getString()

Definition at line 914 of file Core.cpp.

References LLVMConstStringInContext(), and LLVMGetGlobalContext().

LLVMValueRef LLVMConstStringInContext ( LLVMContextRef  C,
const char *  Str,
unsigned  Length,
LLVMBool  DontNullTerminate 
)

Create a ConstantDataSequential and initialize it with a string.

See also:
llvm::ConstantDataArray::getString()

Definition at line 898 of file Core.cpp.

References llvm::ConstantDataArray::getString(), llvm::unwrap(), and llvm::wrap().

Referenced by LLVMConstString().

LLVMValueRef LLVMConstStruct ( LLVMValueRef ConstantVals,
unsigned  Count,
LLVMBool  Packed 
)

Create a ConstantStruct in the global Context.

This is the same as LLVMConstStructInContext except it operates on the global Context.

See also:
LLVMConstStructInContext()

Definition at line 940 of file Core.cpp.

References LLVMConstStructInContext(), and LLVMGetGlobalContext().

LLVMValueRef LLVMConstStructInContext ( LLVMContextRef  C,
LLVMValueRef ConstantVals,
unsigned  Count,
LLVMBool  Packed 
)

Create an anonymous ConstantStruct with the specified values.

See also:
llvm::ConstantStruct::getAnon()

Definition at line 906 of file Core.cpp.

References llvm::ConstantStruct::getAnon(), llvm::makeArrayRef(), llvm::unwrap(), and llvm::wrap().

Referenced by LLVMConstStruct().

LLVMValueRef LLVMConstVector ( LLVMValueRef ScalarConstantVals,
unsigned  Size 
)

Create a ConstantVector from values.

See also:
llvm::ConstantVector::get()

Definition at line 955 of file Core.cpp.

References llvm::ConstantVector::get(), llvm::makeArrayRef(), and llvm::wrap().

const char* LLVMGetAsString ( LLVMValueRef  c,
size_t *  out 
)

Get the given constant data sequential as a string.

See also:
ConstantDataSequential::getAsString()

Definition at line 928 of file Core.cpp.

References llvm::StringRef::data(), llvm::StringRef::size(), and llvm::unwrap().

Get an element at specified index as a constant.

See also:
ConstantDataSequential::getElementAsConstant()

Definition at line 920 of file Core.cpp.

References llvm::unwrap(), and llvm::wrap().

Returns true if the specified constant is an array of i8.

See also:
ConstantDataSequential::getAsString()

Definition at line 924 of file Core.cpp.

References llvm::unwrap().