summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-08-12 22:10:57 +0000
committerDan Gohman <gohman@apple.com>2009-08-12 22:10:57 +0000
commita9ad04191cb56c42944b17980b8b2bb2afe11ab2 (patch)
tree217ac479944faf363c1d09f76ff1b9eb70fbbd57
parent2ffb0ce7dce2d5c243b90493807308af6fab0528 (diff)
downloadllvm-a9ad04191cb56c42944b17980b8b2bb2afe11ab2.tar.gz
llvm-a9ad04191cb56c42944b17980b8b2bb2afe11ab2.tar.bz2
llvm-a9ad04191cb56c42944b17980b8b2bb2afe11ab2.tar.xz
This void is implicit in C++.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78848 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/ADT/DenseMap.h4
-rw-r--r--include/llvm/ExecutionEngine/JITMemoryManager.h4
-rw-r--r--include/llvm/Support/ErrorHandling.h2
-rw-r--r--include/llvm/Support/raw_ostream.h4
-rw-r--r--include/llvm/Support/type_traits.h2
-rw-r--r--include/llvm/System/Disassembler.h2
-rw-r--r--lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp2
-rw-r--r--lib/ExecutionEngine/JIT/Intercept.cpp2
-rw-r--r--lib/ExecutionEngine/JIT/JITEmitter.cpp4
-rw-r--r--lib/ExecutionEngine/JIT/JITMemoryManager.cpp4
-rw-r--r--lib/Support/ErrorHandling.cpp2
-rw-r--r--lib/System/Disassembler.cpp2
-rw-r--r--lib/Target/ARM/ARMJITInfo.cpp2
-rw-r--r--lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp2
-rw-r--r--lib/Target/Mips/MipsRegisterInfo.cpp2
-rw-r--r--lib/Target/Mips/MipsRegisterInfo.h2
-rw-r--r--lib/Target/PIC16/PIC16AsmPrinter.cpp2
-rw-r--r--lib/Target/PIC16/PIC16AsmPrinter.h2
-rw-r--r--lib/Target/XCore/XCoreInstrInfo.cpp2
-rw-r--r--lib/Target/XCore/XCoreInstrInfo.h2
-rw-r--r--tools/llvmc/example/mcc16/plugins/PIC16Base/PluginMain.cpp14
-rw-r--r--utils/TableGen/Record.h8
-rw-r--r--utils/TableGen/TGParser.cpp2
23 files changed, 37 insertions, 37 deletions
diff --git a/include/llvm/ADT/DenseMap.h b/include/llvm/ADT/DenseMap.h
index 79672f996d..b5862a9f01 100644
--- a/include/llvm/ADT/DenseMap.h
+++ b/include/llvm/ADT/DenseMap.h
@@ -426,7 +426,7 @@ class DenseMapIterator {
protected:
const BucketT *Ptr, *End;
public:
- DenseMapIterator(void) : Ptr(0), End(0) {}
+ DenseMapIterator() : Ptr(0), End(0) {}
DenseMapIterator(const BucketT *Pos, const BucketT *E) : Ptr(Pos), End(E) {
AdvancePastEmptyBuckets();
@@ -470,7 +470,7 @@ private:
template<typename KeyT, typename ValueT, typename KeyInfoT, typename ValueInfoT>
class DenseMapConstIterator : public DenseMapIterator<KeyT, ValueT, KeyInfoT> {
public:
- DenseMapConstIterator(void) : DenseMapIterator<KeyT, ValueT, KeyInfoT>() {}
+ DenseMapConstIterator() : DenseMapIterator<KeyT, ValueT, KeyInfoT>() {}
DenseMapConstIterator(const std::pair<KeyT, ValueT> *Pos,
const std::pair<KeyT, ValueT> *E)
: DenseMapIterator<KeyT, ValueT, KeyInfoT>(Pos, E) {
diff --git a/include/llvm/ExecutionEngine/JITMemoryManager.h b/include/llvm/ExecutionEngine/JITMemoryManager.h
index 4539011571..21dee55347 100644
--- a/include/llvm/ExecutionEngine/JITMemoryManager.h
+++ b/include/llvm/ExecutionEngine/JITMemoryManager.h
@@ -41,11 +41,11 @@ public:
/// setMemoryWritable - When code generation is in progress,
/// the code pages may need permissions changed.
- virtual void setMemoryWritable(void) = 0;
+ virtual void setMemoryWritable() = 0;
/// setMemoryExecutable - When code generation is done and we're ready to
/// start execution, the code pages may need permissions changed.
- virtual void setMemoryExecutable(void) = 0;
+ virtual void setMemoryExecutable() = 0;
/// setPoisonMemory - Setting this flag to true makes the memory manager
/// garbage values over freed memory. This is useful for testing and
diff --git a/include/llvm/Support/ErrorHandling.h b/include/llvm/Support/ErrorHandling.h
index dccdf9b29c..159a3c5d16 100644
--- a/include/llvm/Support/ErrorHandling.h
+++ b/include/llvm/Support/ErrorHandling.h
@@ -45,7 +45,7 @@ namespace llvm {
/// Restores default error handling behaviour.
/// This must not be called between llvm_start_multithreaded() and
/// llvm_stop_multithreaded().
- void llvm_remove_error_handler(void);
+ void llvm_remove_error_handler();
/// Reports a serious error, calling any installed error handler.
/// If no error handler is installed the default is to print the message to
diff --git a/include/llvm/Support/raw_ostream.h b/include/llvm/Support/raw_ostream.h
index 5f6578fcb5..f7fbe21ee3 100644
--- a/include/llvm/Support/raw_ostream.h
+++ b/include/llvm/Support/raw_ostream.h
@@ -250,8 +250,8 @@ protected:
void error_detected() { Error = true; }
typedef char * iterator;
- iterator begin(void) { return OutBufStart; }
- iterator end(void) { return OutBufCur; }
+ iterator begin() { return OutBufStart; }
+ iterator end() { return OutBufCur; }
//===--------------------------------------------------------------------===//
// Private Interface
diff --git a/include/llvm/Support/type_traits.h b/include/llvm/Support/type_traits.h
index 32736b4141..71f7655e2e 100644
--- a/include/llvm/Support/type_traits.h
+++ b/include/llvm/Support/type_traits.h
@@ -35,7 +35,7 @@ namespace dont_use
// important to make the is_class<T>::value idiom zero cost. it
// evaluates to a constant 1 or 0 depending on whether the
// parameter T is a class or not (respectively).
- template<typename T> char is_class_helper(void(T::*)(void));
+ template<typename T> char is_class_helper(void(T::*)());
template<typename T> double is_class_helper(...);
}
diff --git a/include/llvm/System/Disassembler.h b/include/llvm/System/Disassembler.h
index d1d8a81007..6d1cc0fdcb 100644
--- a/include/llvm/System/Disassembler.h
+++ b/include/llvm/System/Disassembler.h
@@ -23,7 +23,7 @@ namespace sys {
/// This function returns true, if there is possible to use some external
/// disassembler library. False otherwise.
-bool hasDisassembler(void);
+bool hasDisassembler();
/// This function provides some "glue" code to call external disassembler
/// libraries.
diff --git a/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp b/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
index 68097fd121..37f6ef07f6 100644
--- a/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
+++ b/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
@@ -55,7 +55,7 @@ static ManagedStatic<std::map<const Function *, ExFunc> > ExportedFunctions;
static std::map<std::string, ExFunc> FuncNames;
#ifdef USE_LIBFFI
-typedef void (*RawFunc)(void);
+typedef void (*RawFunc)();
static ManagedStatic<std::map<const Function *, RawFunc> > RawFunctions;
#endif
diff --git a/lib/ExecutionEngine/JIT/Intercept.cpp b/lib/ExecutionEngine/JIT/Intercept.cpp
index 33143394f4..f1e900f63b 100644
--- a/lib/ExecutionEngine/JIT/Intercept.cpp
+++ b/lib/ExecutionEngine/JIT/Intercept.cpp
@@ -85,7 +85,7 @@ static void jit_exit(int Status) {
}
// jit_atexit - Used to intercept the "atexit" library call.
-static int jit_atexit(void (*Fn)(void)) {
+static int jit_atexit(void (*Fn)()) {
AtExitHandlers.push_back(Fn); // Take note of atexit handler...
return 0; // Always successful
}
diff --git a/lib/ExecutionEngine/JIT/JITEmitter.cpp b/lib/ExecutionEngine/JIT/JITEmitter.cpp
index c3e16510b4..23321260f2 100644
--- a/lib/ExecutionEngine/JIT/JITEmitter.cpp
+++ b/lib/ExecutionEngine/JIT/JITEmitter.cpp
@@ -606,11 +606,11 @@ namespace {
if (DwarfExceptionHandling) DE->setModuleInfo(Info);
}
- void setMemoryExecutable(void) {
+ void setMemoryExecutable() {
MemMgr->setMemoryExecutable();
}
- JITMemoryManager *getMemMgr(void) const { return MemMgr; }
+ JITMemoryManager *getMemMgr() const { return MemMgr; }
private:
void *getPointerToGlobal(GlobalValue *GV, void *Reference, bool NoNeedStub);
diff --git a/lib/ExecutionEngine/JIT/JITMemoryManager.cpp b/lib/ExecutionEngine/JIT/JITMemoryManager.cpp
index 3f38f9c241..f40e67d90c 100644
--- a/lib/ExecutionEngine/JIT/JITMemoryManager.cpp
+++ b/lib/ExecutionEngine/JIT/JITMemoryManager.cpp
@@ -521,14 +521,14 @@ namespace {
/// setMemoryWritable - When code generation is in progress,
/// the code pages may need permissions changed.
- void setMemoryWritable(void)
+ void setMemoryWritable()
{
for (unsigned i = 0, e = CodeSlabs.size(); i != e; ++i)
sys::Memory::setWritable(CodeSlabs[i]);
}
/// setMemoryExecutable - When code generation is done and we're ready to
/// start execution, the code pages may need permissions changed.
- void setMemoryExecutable(void)
+ void setMemoryExecutable()
{
for (unsigned i = 0, e = CodeSlabs.size(); i != e; ++i)
sys::Memory::setExecutable(CodeSlabs[i]);
diff --git a/lib/Support/ErrorHandling.cpp b/lib/Support/ErrorHandling.cpp
index 81669223b0..3467fe702b 100644
--- a/lib/Support/ErrorHandling.cpp
+++ b/lib/Support/ErrorHandling.cpp
@@ -35,7 +35,7 @@ void llvm_install_error_handler(llvm_error_handler_t handler,
ErrorHandlerUserData = user_data;
}
-void llvm_remove_error_handler(void) {
+void llvm_remove_error_handler() {
ErrorHandler = 0;
}
diff --git a/lib/System/Disassembler.cpp b/lib/System/Disassembler.cpp
index 378fe262bc..bad427a58d 100644
--- a/lib/System/Disassembler.cpp
+++ b/lib/System/Disassembler.cpp
@@ -26,7 +26,7 @@
using namespace llvm;
-bool llvm::sys::hasDisassembler(void)
+bool llvm::sys::hasDisassembler()
{
#if defined (__i386__) || defined (__amd64__) || defined (__x86_64__)
// We have option to enable udis86 library.
diff --git a/lib/Target/ARM/ARMJITInfo.cpp b/lib/Target/ARM/ARMJITInfo.cpp
index 10c765cec2..a3866c8bd6 100644
--- a/lib/Target/ARM/ARMJITInfo.cpp
+++ b/lib/Target/ARM/ARMJITInfo.cpp
@@ -51,7 +51,7 @@ static TargetJITInfo::JITCompilerFn JITCompilerFunction;
// control over register saving and restoring.
extern "C" {
#if defined(__arm__)
- void ARMCompilationCallback(void);
+ void ARMCompilationCallback();
asm(
".text\n"
".align 2\n"
diff --git a/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp b/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp
index bcdbe008d6..010a299bc1 100644
--- a/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp
+++ b/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp
@@ -74,7 +74,7 @@ namespace {
void printSavedRegsBitmask(MachineFunction &MF);
void printHex32(unsigned int Value);
- const char *emitCurrentABIString(void);
+ const char *emitCurrentABIString();
void emitFunctionStart(MachineFunction &MF);
void emitFunctionEnd(MachineFunction &MF);
void emitFrameDirective(MachineFunction &MF);
diff --git a/lib/Target/Mips/MipsRegisterInfo.cpp b/lib/Target/Mips/MipsRegisterInfo.cpp
index 1176b42b48..51fbf84b0e 100644
--- a/lib/Target/Mips/MipsRegisterInfo.cpp
+++ b/lib/Target/Mips/MipsRegisterInfo.cpp
@@ -86,7 +86,7 @@ getRegisterNumbering(unsigned RegEnum)
return 0; // Not reached
}
-unsigned MipsRegisterInfo::getPICCallReg(void) { return Mips::T9; }
+unsigned MipsRegisterInfo::getPICCallReg() { return Mips::T9; }
//===----------------------------------------------------------------------===//
// Callee Saved Registers methods
diff --git a/lib/Target/Mips/MipsRegisterInfo.h b/lib/Target/Mips/MipsRegisterInfo.h
index 808e995b4e..fdb8cd026a 100644
--- a/lib/Target/Mips/MipsRegisterInfo.h
+++ b/lib/Target/Mips/MipsRegisterInfo.h
@@ -34,7 +34,7 @@ struct MipsRegisterInfo : public MipsGenRegisterInfo {
static unsigned getRegisterNumbering(unsigned RegEnum);
/// Get PIC indirect call register
- static unsigned getPICCallReg(void);
+ static unsigned getPICCallReg();
/// Adjust the Mips stack frame.
void adjustMipsStackFrame(MachineFunction &MF) const;
diff --git a/lib/Target/PIC16/PIC16AsmPrinter.cpp b/lib/Target/PIC16/PIC16AsmPrinter.cpp
index a981d83752..1cd64f616f 100644
--- a/lib/Target/PIC16/PIC16AsmPrinter.cpp
+++ b/lib/Target/PIC16/PIC16AsmPrinter.cpp
@@ -194,7 +194,7 @@ static bool is_duplicate(const char *s1, const char *s2) {
/// printLibcallDecls - print the extern declarations for compiler
/// intrinsics.
///
-void PIC16AsmPrinter::printLibcallDecls(void) {
+void PIC16AsmPrinter::printLibcallDecls() {
// If no libcalls used, return.
if (LibcallDecls.empty()) return;
diff --git a/lib/Target/PIC16/PIC16AsmPrinter.h b/lib/Target/PIC16/PIC16AsmPrinter.h
index b7a50a9bef..3eea880a20 100644
--- a/lib/Target/PIC16/PIC16AsmPrinter.h
+++ b/lib/Target/PIC16/PIC16AsmPrinter.h
@@ -56,7 +56,7 @@ namespace llvm {
void EmitRemainingAutos ();
void EmitRomData (Module &M);
void EmitFunctionFrame(MachineFunction &MF);
- void printLibcallDecls(void);
+ void printLibcallDecls();
protected:
bool doInitialization(Module &M);
bool doFinalization(Module &M);
diff --git a/lib/Target/XCore/XCoreInstrInfo.cpp b/lib/Target/XCore/XCoreInstrInfo.cpp
index 4dc307bc2f..9461e20b3a 100644
--- a/lib/Target/XCore/XCoreInstrInfo.cpp
+++ b/lib/Target/XCore/XCoreInstrInfo.cpp
@@ -37,7 +37,7 @@ namespace XCore {
using namespace llvm;
-XCoreInstrInfo::XCoreInstrInfo(void)
+XCoreInstrInfo::XCoreInstrInfo()
: TargetInstrInfoImpl(XCoreInsts, array_lengthof(XCoreInsts)),
RI(*this) {
}
diff --git a/lib/Target/XCore/XCoreInstrInfo.h b/lib/Target/XCore/XCoreInstrInfo.h
index c822986389..c97e6b4d28 100644
--- a/lib/Target/XCore/XCoreInstrInfo.h
+++ b/lib/Target/XCore/XCoreInstrInfo.h
@@ -22,7 +22,7 @@ namespace llvm {
class XCoreInstrInfo : public TargetInstrInfoImpl {
const XCoreRegisterInfo RI;
public:
- XCoreInstrInfo(void);
+ XCoreInstrInfo();
/// getRegisterInfo - TargetInstrInfo is a superset of MRegister info. As
/// such, whenever a client has an instance of instruction info, it should
diff --git a/tools/llvmc/example/mcc16/plugins/PIC16Base/PluginMain.cpp b/tools/llvmc/example/mcc16/plugins/PIC16Base/PluginMain.cpp
index 96dd296df6..40837cba8c 100644
--- a/tools/llvmc/example/mcc16/plugins/PIC16Base/PluginMain.cpp
+++ b/tools/llvmc/example/mcc16/plugins/PIC16Base/PluginMain.cpp
@@ -12,7 +12,7 @@ namespace llvmc {
// Returns the platform specific directory separator via #ifdefs.
// FIXME: This currently work on linux and windows only. It does not
// work on other unices.
-static std::string GetDirSeparator(void) {
+static std::string GetDirSeparator() {
#ifdef __linux__
return "/";
#else
@@ -22,7 +22,7 @@ static std::string GetDirSeparator(void) {
namespace hooks {
// Get the dir where c16 executables reside.
-std::string GetBinDir (void) {
+std::string GetBinDir() {
// Construct a Path object from the program name.
void *P = (void*) (intptr_t) GetBinDir;
sys::Path ProgramFullPath
@@ -36,7 +36,7 @@ std::string GetBinDir (void) {
}
// Get the Top-level Installation dir for c16.
-std::string GetInstallDir (void) {
+std::string GetInstallDir() {
sys::Path BinDirPath = sys::Path(GetBinDir());
// Go one more level up to get the install dir.
@@ -46,22 +46,22 @@ std::string GetInstallDir (void) {
}
// Get the dir where the c16 header files reside.
-std::string GetStdHeadersDir (void) {
+std::string GetStdHeadersDir() {
return GetInstallDir() + "include";
}
// Get the dir where the assembler header files reside.
-std::string GetStdAsmHeadersDir (void) {
+std::string GetStdAsmHeadersDir() {
return GetInstallDir() + "inc";
}
// Get the dir where the linker scripts reside.
-std::string GetStdLinkerScriptsDir (void) {
+std::string GetStdLinkerScriptsDir() {
return GetInstallDir() + "lkr";
}
// Get the dir where startup code, intrinsics and lib reside.
-std::string GetStdLibsDir (void) {
+std::string GetStdLibsDir() {
return GetInstallDir() + "lib";
}
}
diff --git a/utils/TableGen/Record.h b/utils/TableGen/Record.h
index 11db910328..40c8239b9a 100644
--- a/utils/TableGen/Record.h
+++ b/utils/TableGen/Record.h
@@ -782,7 +782,7 @@ public:
// Clone - Clone this operator, replacing arguments with the new list
virtual OpInit *clone(std::vector<Init *> &Operands) = 0;
- virtual int getNumOperands(void) const = 0;
+ virtual int getNumOperands() const = 0;
virtual Init *getOperand(int i) = 0;
// Fold - If possible, fold this to a simpler init. Return this if not
@@ -820,7 +820,7 @@ public:
return new UnOpInit(getOpcode(), *Operands.begin(), getType());
}
- int getNumOperands(void) const { return 1; }
+ int getNumOperands() const { return 1; }
Init *getOperand(int i) {
assert(i == 0 && "Invalid operand id for unary operator");
return getOperand();
@@ -864,7 +864,7 @@ public:
return new BinOpInit(getOpcode(), Operands[0], Operands[1], getType());
}
- int getNumOperands(void) const { return 2; }
+ int getNumOperands() const { return 2; }
Init *getOperand(int i) {
assert((i == 0 || i == 1) && "Invalid operand id for binary operator");
if (i == 0) {
@@ -909,7 +909,7 @@ public:
getType());
}
- int getNumOperands(void) const { return 3; }
+ int getNumOperands() const { return 3; }
Init *getOperand(int i) {
assert((i == 0 || i == 1 || i == 2) &&
"Invalid operand id for ternary operator");
diff --git a/utils/TableGen/TGParser.cpp b/utils/TableGen/TGParser.cpp
index ba480e6e92..7122265005 100644
--- a/utils/TableGen/TGParser.cpp
+++ b/utils/TableGen/TGParser.cpp
@@ -974,7 +974,7 @@ Init *TGParser::ParseOperation(Record *CurRec) {
///
/// OperatorType ::= '<' Type '>'
///
-RecTy *TGParser::ParseOperatorType(void) {
+RecTy *TGParser::ParseOperatorType() {
RecTy *Type = 0;
if (Lex.getCode() != tgtok::less) {