LLVM API Documentation

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

Functions

LLVMUseRef LLVMGetFirstUse (LLVMValueRef Val)
 
LLVMUseRef LLVMGetNextUse (LLVMUseRef U)
 
LLVMValueRef LLVMGetUser (LLVMUseRef U)
 
LLVMValueRef LLVMGetUsedValue (LLVMUseRef U)
 

Detailed Description

This module defines functions that allow you to inspect the uses of a LLVMValueRef.

It is possible to obtain an LLVMUseRef for any LLVMValueRef instance. Each LLVMUseRef (which corresponds to a llvm::Use instance) holds a llvm::User and llvm::Value.

Function Documentation

LLVMUseRef LLVMGetFirstUse ( LLVMValueRef  Val)

Obtain the first use of a value.

Uses are obtained in an iterator fashion. First, call this function to obtain a reference to the first use. Then, call LLVMGetNextUse() on that instance and all subsequently obtained instances until LLVMGetNextUse() returns NULL.

See Also
llvm::Value::use_begin()

Definition at line 513 of file Core.cpp.

References llvm::value_use_iterator< UserTy >::getUse(), I, llvm::unwrap(), llvm::Value::use_begin(), llvm::Value::use_end(), and llvm::wrap().

LLVMUseRef LLVMGetNextUse ( LLVMUseRef  U)

Obtain the next use of a value.

This effectively advances the iterator. It returns NULL if you are on the final use and no more are available.

Definition at line 521 of file Core.cpp.

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

LLVMValueRef LLVMGetUsedValue ( LLVMUseRef  U)

Obtain the value this use corresponds to.

See Also
llvm::Use::get().

Definition at line 532 of file Core.cpp.

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

LLVMValueRef LLVMGetUser ( LLVMUseRef  U)

Obtain the user value for a user.

The returned value corresponds to a llvm::User type.

See Also
llvm::Use::getUser()

Definition at line 528 of file Core.cpp.

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