Rename LLVMUseIteratorRef to LLVMUseRef since we don't refer to iterators in llvm-c.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97585 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Erick Tryzelaar 2010-03-02 20:32:28 +00:00
parent 1aa3e9269f
commit 24b3733425
2 changed files with 17 additions and 17 deletions

View File

@ -92,11 +92,8 @@ typedef struct LLVMOpaqueMemoryBuffer *LLVMMemoryBufferRef;
/** See the llvm::PassManagerBase class. */ /** See the llvm::PassManagerBase class. */
typedef struct LLVMOpaquePassManager *LLVMPassManagerRef; typedef struct LLVMOpaquePassManager *LLVMPassManagerRef;
/** /** Used to get the users and usees of a Value. See the llvm::Use class. */
* Used to iterate through the uses of a Value, allowing access to all Values typedef struct LLVMOpaqueUse *LLVMUseRef;
* that use this Value. See the llvm::Use and llvm::value_use_iterator classes.
*/
typedef struct LLVMOpaqueUseIterator *LLVMUseIteratorRef;
typedef enum { typedef enum {
LLVMZExtAttribute = 1<<0, LLVMZExtAttribute = 1<<0,
@ -514,10 +511,10 @@ void LLVMSetMetadata(LLVMValueRef Val, unsigned KindID, LLVMValueRef Node);
LLVM_FOR_EACH_VALUE_SUBCLASS(LLVM_DECLARE_VALUE_CAST) LLVM_FOR_EACH_VALUE_SUBCLASS(LLVM_DECLARE_VALUE_CAST)
/* Operations on Uses */ /* Operations on Uses */
LLVMUseIteratorRef LLVMGetFirstUse(LLVMValueRef Val); LLVMUseRef LLVMGetFirstUse(LLVMValueRef Val);
LLVMUseIteratorRef LLVMGetNextUse(LLVMUseIteratorRef U); LLVMUseRef LLVMGetNextUse(LLVMUseRef U);
LLVMValueRef LLVMGetUser(LLVMUseIteratorRef U); LLVMValueRef LLVMGetUser(LLVMUseRef U);
LLVMValueRef LLVMGetUsedValue(LLVMUseIteratorRef U); LLVMValueRef LLVMGetUsedValue(LLVMUseRef U);
/* Operations on Users */ /* Operations on Users */
LLVMValueRef LLVMGetOperand(LLVMValueRef Val, unsigned Index); LLVMValueRef LLVMGetOperand(LLVMValueRef Val, unsigned Index);
@ -1096,7 +1093,7 @@ namespace llvm {
DEFINE_SIMPLE_CONVERSION_FUNCTIONS(PATypeHolder, LLVMTypeHandleRef ) DEFINE_SIMPLE_CONVERSION_FUNCTIONS(PATypeHolder, LLVMTypeHandleRef )
DEFINE_SIMPLE_CONVERSION_FUNCTIONS(MemoryBuffer, LLVMMemoryBufferRef ) DEFINE_SIMPLE_CONVERSION_FUNCTIONS(MemoryBuffer, LLVMMemoryBufferRef )
DEFINE_SIMPLE_CONVERSION_FUNCTIONS(LLVMContext, LLVMContextRef ) DEFINE_SIMPLE_CONVERSION_FUNCTIONS(LLVMContext, LLVMContextRef )
DEFINE_SIMPLE_CONVERSION_FUNCTIONS(Use, LLVMUseIteratorRef ) DEFINE_SIMPLE_CONVERSION_FUNCTIONS(Use, LLVMUseRef )
DEFINE_STDCXX_CONVERSION_FUNCTIONS(PassManagerBase, LLVMPassManagerRef ) DEFINE_STDCXX_CONVERSION_FUNCTIONS(PassManagerBase, LLVMPassManagerRef )
/* LLVMModuleProviderRef exists for historical reasons, but now just holds a /* LLVMModuleProviderRef exists for historical reasons, but now just holds a
* Module. * Module.

View File

@ -456,7 +456,7 @@ void LLVMSetMetadata(LLVMValueRef Inst, unsigned KindID, LLVMValueRef MD) {
LLVM_FOR_EACH_VALUE_SUBCLASS(LLVM_DEFINE_VALUE_CAST) LLVM_FOR_EACH_VALUE_SUBCLASS(LLVM_DEFINE_VALUE_CAST)
/*--.. Operations on Uses ..................................................--*/ /*--.. Operations on Uses ..................................................--*/
LLVMUseIteratorRef LLVMGetFirstUse(LLVMValueRef Val) { LLVMUseRef LLVMGetFirstUse(LLVMValueRef Val) {
Value *V = unwrap(Val); Value *V = unwrap(Val);
Value::use_iterator I = V->use_begin(); Value::use_iterator I = V->use_begin();
if (I == V->use_end()) if (I == V->use_end())
@ -464,16 +464,19 @@ LLVMUseIteratorRef LLVMGetFirstUse(LLVMValueRef Val) {
return wrap(&(I.getUse())); return wrap(&(I.getUse()));
} }
LLVMUseIteratorRef LLVMGetNextUse(LLVMUseIteratorRef UR) { LLVMUseRef LLVMGetNextUse(LLVMUseRef U) {
return wrap(unwrap(UR)->getNext()); Use *Next = unwrap(U)->getNext();
if (Next)
return wrap(Next);
return 0;
} }
LLVMValueRef LLVMGetUser(LLVMUseIteratorRef UR) { LLVMValueRef LLVMGetUser(LLVMUseRef U) {
return wrap(unwrap(UR)->getUser()); return wrap(unwrap(U)->getUser());
} }
LLVMValueRef LLVMGetUsedValue(LLVMUseIteratorRef UR) { LLVMValueRef LLVMGetUsedValue(LLVMUseRef U) {
return wrap(unwrap(UR)->get()); return wrap(unwrap(U)->get());
} }
/*--.. Operations on Users .................................................--*/ /*--.. Operations on Users .................................................--*/