LLVM  mainline
Defines | Functions
General APIs
Values

Functions in this section work on all LLVMValueRef instances, regardless of their sub-type. More...

Collaboration diagram for General APIs:

Defines

#define LLVM_DECLARE_VALUE_CAST(name)   LLVMValueRef LLVMIsA##name(LLVMValueRef Val);
 Convert value instances between types.

Functions

LLVMTypeRef LLVMTypeOf (LLVMValueRef Val)
 Obtain the type of a value.
const char * LLVMGetValueName (LLVMValueRef Val)
 Obtain the string name of a value.
void LLVMSetValueName (LLVMValueRef Val, const char *Name)
 Set the string name of a value.
void LLVMDumpValue (LLVMValueRef Val)
 Dump a representation of a value to stderr.
char * LLVMPrintValueToString (LLVMValueRef Val)
 Return a string representation of the value.
void LLVMReplaceAllUsesWith (LLVMValueRef OldVal, LLVMValueRef NewVal)
 Replace all uses of a value with another one.
LLVMBool LLVMIsConstant (LLVMValueRef Val)
 Determine whether the specified constant instance is constant.
LLVMBool LLVMIsUndef (LLVMValueRef Val)
 Determine whether a value instance is undefined.
LLVMValueRef LLVMIsAMDNode (LLVMValueRef Val)
LLVMValueRef LLVMIsAMDString (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.


Define 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 1312 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 543 of file Core.cpp.

References llvm::unwrap().

Obtain the string name of a value.

See also:
llvm::Value::getName()

Definition at line 535 of file Core.cpp.

References llvm::unwrap().

Definition at line 606 of file Core.cpp.

References llvm::unwrap().

Definition at line 614 of file Core.cpp.

References llvm::unwrap().

Determine whether the specified constant instance is constant.

Definition at line 702 of file Core.cpp.

References llvm::unwrap().

Determine whether a value instance is undefined.

Definition at line 712 of file Core.cpp.

References llvm::unwrap().

Return a string representation of the value.

Use LLVMDisposeMessage to free the string.

See also:
llvm::Value::print()

Definition at line 547 of file Core.cpp.

References llvm::raw_ostream::flush(), 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 561 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 539 of file Core.cpp.

References llvm::unwrap().

Obtain the type of a value.

See also:
llvm::Value::getType()

Definition at line 531 of file Core.cpp.

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