LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Macros | Functions
General APIs
Collaboration diagram for General APIs:

Macros

#define LLVM_DECLARE_VALUE_CAST(name)   LLVMValueRef LLVMIsA##name(LLVMValueRef Val);
 

Functions

LLVMTypeRef LLVMTypeOf (LLVMValueRef Val)
 
const char * LLVMGetValueName (LLVMValueRef Val)
 
void LLVMSetValueName (LLVMValueRef Val, const char *Name)
 
void LLVMDumpValue (LLVMValueRef Val)
 
char * LLVMPrintValueToString (LLVMValueRef Val)
 
void LLVMReplaceAllUsesWith (LLVMValueRef OldVal, LLVMValueRef NewVal)
 
LLVMBool LLVMIsConstant (LLVMValueRef Val)
 
LLVMBool LLVMIsUndef (LLVMValueRef Val)
 

Detailed Description

Functions in this section work on all LLVMValueRef instances, regardless of their sub-type. They correspond to functions available on llvm::Value.

Macro Definition Documentation

#define LLVM_DECLARE_VALUE_CAST (   name)    LLVMValueRef LLVMIsA##name(LLVMValueRef Val);

Convert value instances between types.

Internally, an LLVMValueRef is "pinned" to a specific type. This series of functions allows you to cast an instance to a specific type.

If the cast is not valid for the specified type, NULL is returned.

See Also
llvm::dyn_cast_or_null<>

Definition at line 1254 of file Core.h.

Function Documentation

void LLVMDumpValue ( LLVMValueRef  Val)

Dump a representation of a value to stderr.

See Also
llvm::Value::dump()

Definition at line 473 of file Core.cpp.

References llvm::unwrap().

const char* LLVMGetValueName ( LLVMValueRef  Val)

Obtain the string name of a value.

See Also
llvm::Value::getName()

Definition at line 465 of file Core.cpp.

References llvm::unwrap().

LLVMBool LLVMIsConstant ( LLVMValueRef  Val)

Determine whether the specified constant instance is constant.

Definition at line 569 of file Core.cpp.

References llvm::unwrap().

LLVMBool LLVMIsUndef ( LLVMValueRef  Val)

Determine whether a value instance is undefined.

Definition at line 579 of file Core.cpp.

References llvm::unwrap().

char* LLVMPrintValueToString ( LLVMValueRef  Val)

Return a string representation of the value. Use LLVMDisposeMessage to free the string.

See Also
llvm::Value::print()

Definition at line 477 of file Core.cpp.

References llvm::raw_ostream::flush(), llvm::LibFunc::strdup, and llvm::unwrap().

void LLVMReplaceAllUsesWith ( LLVMValueRef  OldVal,
LLVMValueRef  NewVal 
)

Replace all uses of a value with another one.

See Also
llvm::Value::replaceAllUsesWith()

Definition at line 487 of file Core.cpp.

References llvm::unwrap().

void LLVMSetValueName ( LLVMValueRef  Val,
const char *  Name 
)

Set the string name of a value.

See Also
llvm::Value::setName()

Definition at line 469 of file Core.cpp.

References llvm::unwrap().

LLVMTypeRef LLVMTypeOf ( LLVMValueRef  Val)

Obtain the type of a value.

See Also
llvm::Value::getType()

Definition at line 461 of file Core.cpp.

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