@@ -38,9 +38,9 @@ DEFINE_ISA_CONVERSION_FUNCTIONS(Pass, LLVMPassRef)
3838
3939// Implementation code
4040
41- const char* llvmsharp_ConstantDataArray_getData(LLVMValueRef ConstantDataArrayRef , int32_t * out_size)
41+ const char* llvmsharp_ConstantDataArray_getData(LLVMValueRef array , int32_t * out_size)
4242{
43- ConstantDataArray* unwrapped = unwrap<ConstantDataArray>(ConstantDataArrayRef );
43+ ConstantDataArray* unwrapped = unwrap<ConstantDataArray>(array );
4444 StringRef stringRef = unwrapped->getRawDataValues ();
4545 *out_size = (int32_t )stringRef.size ();
4646 return stringRef.data ();
@@ -339,26 +339,26 @@ LLVMMetadataRef llvmsharp_DIVariable_getType(LLVMMetadataRef variable)
339339 return wrap (unwrapped->getType ());
340340}
341341
342- LLVMTypeRef llvmsharp_Function_getFunctionType (LLVMValueRef FnRef )
342+ LLVMTypeRef llvmsharp_Function_getFunctionType (LLVMValueRef function )
343343{
344- Function* Fn = unwrap<Function>(FnRef );
345- Type* type = Fn ->getFunctionType ();
344+ Function* unwrapped = unwrap<Function>(function );
345+ Type* type = unwrapped ->getFunctionType ();
346346 return wrap (type);
347347}
348348
349- LLVMTypeRef llvmsharp_Function_getReturnType (LLVMValueRef FnRef )
349+ LLVMTypeRef llvmsharp_Function_getReturnType (LLVMValueRef function )
350350{
351- Function* Fn = unwrap<Function>(FnRef );
352- Type* type = Fn ->getReturnType ();
351+ Function* unwrapped = unwrap<Function>(function );
352+ Type* type = unwrapped ->getReturnType ();
353353 return wrap (type);
354354}
355355
356356LLVMMetadataRef llvmsharp_GlobalVariable_getGlobalVariableExpression (LLVMValueRef global_variable)
357357{
358- LLVMMetadataRef metadataRef = llvmsharp_GlobalVariable_getMetadata (global_variable, LLVMContext::MD_dbg);
359- if (isa<Metadata, DIGlobalVariableExpression>(unwrap<Metadata>(metadataRef )))
358+ LLVMMetadataRef unwrapped = llvmsharp_GlobalVariable_getMetadata (global_variable, LLVMContext::MD_dbg);
359+ if (isa<Metadata, DIGlobalVariableExpression>(unwrap<Metadata>(unwrapped )))
360360 {
361- return metadataRef ;
361+ return unwrapped ;
362362 }
363363 else
364364 {
@@ -372,22 +372,22 @@ LLVMMetadataRef llvmsharp_GlobalVariable_getMetadata(LLVMValueRef global_variabl
372372 return wrap (unwrapped->getMetadata (KindID));
373373}
374374
375- uint8_t llvmsharp_Instruction_hasNoSignedWrap (LLVMValueRef InstructionRef )
375+ uint8_t llvmsharp_Instruction_hasNoSignedWrap (LLVMValueRef instruction )
376376{
377- Instruction* instruction = unwrap<Instruction>(InstructionRef );
378- return instruction ->hasNoSignedWrap () ? 1 : 0 ;
377+ Instruction* unwrapped = unwrap<Instruction>(instruction );
378+ return unwrapped ->hasNoSignedWrap () ? 1 : 0 ;
379379}
380380
381- uint8_t llvmsharp_Instruction_hasNoUnsignedWrap (LLVMValueRef InstructionRef )
381+ uint8_t llvmsharp_Instruction_hasNoUnsignedWrap (LLVMValueRef instruction )
382382{
383- Instruction* instruction = unwrap<Instruction>(InstructionRef );
384- return instruction ->hasNoUnsignedWrap () ? 1 : 0 ;
383+ Instruction* unwrapped = unwrap<Instruction>(instruction );
384+ return unwrapped ->hasNoUnsignedWrap () ? 1 : 0 ;
385385}
386386
387387void llvmsharp_Module_GetIdentifiedStructTypes (LLVMModuleRef module , LLVMTypeRef** out_buffer, int32_t * out_size)
388388{
389- Module* M = unwrap (module );
390- std::vector<StructType*> types = M ->getIdentifiedStructTypes ();
389+ Module* unwrapped = unwrap (module );
390+ std::vector<StructType*> types = unwrapped ->getIdentifiedStructTypes ();
391391
392392 LLVMTypeRef* buffer = (LLVMTypeRef*)malloc (types.size () * sizeof (LLVMTypeRef));
393393 if (buffer == nullptr )
@@ -411,9 +411,9 @@ void llvmsharp_PassManager_add(LLVMPassManagerRef pass_manager, LLVMPassRef pass
411411 unwrap (pass_manager)->add (unwrap (pass));
412412}
413413
414- int32_t llvmsharp_Value_getDemangledName (LLVMValueRef ValueRef , char * buffer, int32_t buffer_size)
414+ int32_t llvmsharp_Value_getDemangledName (LLVMValueRef value , char * buffer, int32_t buffer_size)
415415{
416- const char * mangled = LLVMGetValueName (ValueRef );
416+ const char * mangled = LLVMGetValueName (value );
417417 std::string result = llvm::demangle (std::string_view (mangled));
418418 int32_t length = (int32_t )result.length ();
419419 int32_t size = length < buffer_size ? length : buffer_size;
0 commit comments