Use (void) instead of () in C code.
authorGordon Henriksen <gordonhenriksen@mac.com>
Sun, 4 May 2008 12:55:34 +0000 (12:55 +0000)
committerGordon Henriksen <gordonhenriksen@mac.com>
Sun, 4 May 2008 12:55:34 +0000 (12:55 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50620 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm-c/Core.h
include/llvm-c/lto.h
lib/VMCore/Core.cpp

index 1c89f66dfc79936e84684880858a3793c0b193cc..d3e7a08d90311350dda5f02761314315756915a0 100644 (file)
@@ -228,20 +228,20 @@ LLVMTypeKind LLVMGetTypeKind(LLVMTypeRef Ty);
 void LLVMRefineAbstractType(LLVMTypeRef AbstractType, LLVMTypeRef ConcreteType);
 
 /* Operations on integer types */
-LLVMTypeRef LLVMInt1Type();
-LLVMTypeRef LLVMInt8Type();
-LLVMTypeRef LLVMInt16Type();
-LLVMTypeRef LLVMInt32Type();
-LLVMTypeRef LLVMInt64Type();
+LLVMTypeRef LLVMInt1Type(void);
+LLVMTypeRef LLVMInt8Type(void);
+LLVMTypeRef LLVMInt16Type(void);
+LLVMTypeRef LLVMInt32Type(void);
+LLVMTypeRef LLVMInt64Type(void);
 LLVMTypeRef LLVMIntType(unsigned NumBits);
 unsigned LLVMGetIntTypeWidth(LLVMTypeRef IntegerTy);
 
 /* Operations on real types */
-LLVMTypeRef LLVMFloatType();
-LLVMTypeRef LLVMDoubleType();
-LLVMTypeRef LLVMX86FP80Type();
-LLVMTypeRef LLVMFP128Type();
-LLVMTypeRef LLVMPPCFP128Type();
+LLVMTypeRef LLVMFloatType(void);
+LLVMTypeRef LLVMDoubleType(void);
+LLVMTypeRef LLVMX86FP80Type(void);
+LLVMTypeRef LLVMFP128Type(void);
+LLVMTypeRef LLVMPPCFP128Type(void);
 
 /* Operations on function types */
 LLVMTypeRef LLVMFunctionType(LLVMTypeRef ReturnType,
@@ -270,9 +270,9 @@ unsigned LLVMGetPointerAddressSpace(LLVMTypeRef PointerTy);
 unsigned LLVMGetVectorSize(LLVMTypeRef VectorTy);
 
 /* Operations on other types */
-LLVMTypeRef LLVMVoidType();
-LLVMTypeRef LLVMLabelType();
-LLVMTypeRef LLVMOpaqueType();
+LLVMTypeRef LLVMVoidType(void);
+LLVMTypeRef LLVMLabelType(void);
+LLVMTypeRef LLVMOpaqueType(void);
 
 /* Operations on type handles */
 LLVMTypeHandleRef LLVMCreateTypeHandle(LLVMTypeRef PotentiallyAbstractTy);
@@ -477,7 +477,7 @@ LLVMBasicBlockRef LLVMGetIncomingBlock(LLVMValueRef PhiNode, unsigned Index);
  * exclusive means of building instructions using the C interface.
  */
 
-LLVMBuilderRef LLVMCreateBuilder();
+LLVMBuilderRef LLVMCreateBuilder(void);
 void LLVMPositionBuilder(LLVMBuilderRef Builder, LLVMBasicBlockRef Block,
                          LLVMValueRef Instr);
 void LLVMPositionBuilderBefore(LLVMBuilderRef Builder, LLVMValueRef Instr);
@@ -637,7 +637,7 @@ void LLVMDisposeMemoryBuffer(LLVMMemoryBufferRef MemBuf);
 /** Constructs a new whole-module pass pipeline. This type of pipeline is
     suitable for link-time optimization and whole-module transformations.
     See llvm::PassManager::PassManager. */
-LLVMPassManagerRef LLVMCreatePassManager();
+LLVMPassManagerRef LLVMCreatePassManager(void);
 
 /** Constructs a new function-by-function pass pipeline over the module
     provider. It does not take ownership of the module provider. This type of
index e42271dea013c435d504be15ca934c3d22c58427..508e871ec4cbfc3376a1f38bb73a270121d1e136 100644 (file)
@@ -63,14 +63,14 @@ extern "C" {
  * Returns a printable string.
  */
 extern const char*
-lto_get_version();
+lto_get_version(void);
 
 
 /**
  * Returns the last error string or NULL if last operation was sucessful.
  */
 extern const char*
-lto_get_error_message();
+lto_get_error_message(void);
 
 
 /**
@@ -160,7 +160,7 @@ lto_module_get_symbol_attribute(lto_module_t mod, unsigned int index);
  * Returns NULL on error (check lto_get_error_message() for details).
  */
 extern lto_code_gen_t
-lto_codegen_create();
+lto_codegen_create(void);
 
 
 /**
index a07464fefd32a917759b36bf548cc5a74ecd4225..22c77f2c4de97c55c797a0bc1f5b31c2ad09a016 100644 (file)
@@ -97,11 +97,11 @@ void LLVMRefineAbstractType(LLVMTypeRef AbstractType, LLVMTypeRef ConcreteType){
 
 /*--.. Operations on integer types .........................................--*/
 
-LLVMTypeRef LLVMInt1Type()  { return (LLVMTypeRef) Type::Int1Ty;  }
-LLVMTypeRef LLVMInt8Type()  { return (LLVMTypeRef) Type::Int8Ty;  }
-LLVMTypeRef LLVMInt16Type() { return (LLVMTypeRef) Type::Int16Ty; }
-LLVMTypeRef LLVMInt32Type() { return (LLVMTypeRef) Type::Int32Ty; }
-LLVMTypeRef LLVMInt64Type() { return (LLVMTypeRef) Type::Int64Ty; }
+LLVMTypeRef LLVMInt1Type(void)  { return (LLVMTypeRef) Type::Int1Ty;  }
+LLVMTypeRef LLVMInt8Type(void)  { return (LLVMTypeRef) Type::Int8Ty;  }
+LLVMTypeRef LLVMInt16Type(void) { return (LLVMTypeRef) Type::Int16Ty; }
+LLVMTypeRef LLVMInt32Type(void) { return (LLVMTypeRef) Type::Int32Ty; }
+LLVMTypeRef LLVMInt64Type(void) { return (LLVMTypeRef) Type::Int64Ty; }
 
 LLVMTypeRef LLVMIntType(unsigned NumBits) {
   return wrap(IntegerType::get(NumBits));
@@ -113,11 +113,11 @@ unsigned LLVMGetIntTypeWidth(LLVMTypeRef IntegerTy) {
 
 /*--.. Operations on real types ............................................--*/
 
-LLVMTypeRef LLVMFloatType()    { return (LLVMTypeRef) Type::FloatTy;     }
-LLVMTypeRef LLVMDoubleType()   { return (LLVMTypeRef) Type::DoubleTy;    }
-LLVMTypeRef LLVMX86FP80Type()  { return (LLVMTypeRef) Type::X86_FP80Ty;  }
-LLVMTypeRef LLVMFP128Type()    { return (LLVMTypeRef) Type::FP128Ty;     }
-LLVMTypeRef LLVMPPCFP128Type() { return (LLVMTypeRef) Type::PPC_FP128Ty; }
+LLVMTypeRef LLVMFloatType(void)    { return (LLVMTypeRef) Type::FloatTy;     }
+LLVMTypeRef LLVMDoubleType(void)   { return (LLVMTypeRef) Type::DoubleTy;    }
+LLVMTypeRef LLVMX86FP80Type(void)  { return (LLVMTypeRef) Type::X86_FP80Ty;  }
+LLVMTypeRef LLVMFP128Type(void)    { return (LLVMTypeRef) Type::FP128Ty;     }
+LLVMTypeRef LLVMPPCFP128Type(void) { return (LLVMTypeRef) Type::PPC_FP128Ty; }
 
 /*--.. Operations on function types ........................................--*/
 
@@ -209,10 +209,10 @@ unsigned LLVMGetVectorSize(LLVMTypeRef VectorTy) {
 
 /*--.. Operations on other types ...........................................--*/
 
-LLVMTypeRef LLVMVoidType()  { return (LLVMTypeRef) Type::VoidTy;  }
-LLVMTypeRef LLVMLabelType() { return (LLVMTypeRef) Type::LabelTy; }
+LLVMTypeRef LLVMVoidType(void)  { return (LLVMTypeRef) Type::VoidTy;  }
+LLVMTypeRef LLVMLabelType(void) { return (LLVMTypeRef) Type::LabelTy; }
 
-LLVMTypeRef LLVMOpaqueType() {
+LLVMTypeRef LLVMOpaqueType(void) {
   return wrap(llvm::OpaqueType::get());
 }
 
@@ -996,7 +996,7 @@ LLVMBasicBlockRef LLVMGetIncomingBlock(LLVMValueRef PhiNode, unsigned Index) {
 
 /*===-- Instruction builders ----------------------------------------------===*/
 
-LLVMBuilderRef LLVMCreateBuilder() {
+LLVMBuilderRef LLVMCreateBuilder(void) {
   return wrap(new IRBuilder());
 }