1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00

This void is implicit in C++.

llvm-svn: 78848
This commit is contained in:
Dan Gohman 2009-08-12 22:10:57 +00:00
parent 875c5b92a2
commit bc6b14ba00
23 changed files with 37 additions and 37 deletions

View File

@ -426,7 +426,7 @@ class DenseMapIterator {
protected: protected:
const BucketT *Ptr, *End; const BucketT *Ptr, *End;
public: public:
DenseMapIterator(void) : Ptr(0), End(0) {} DenseMapIterator() : Ptr(0), End(0) {}
DenseMapIterator(const BucketT *Pos, const BucketT *E) : Ptr(Pos), End(E) { DenseMapIterator(const BucketT *Pos, const BucketT *E) : Ptr(Pos), End(E) {
AdvancePastEmptyBuckets(); AdvancePastEmptyBuckets();
@ -470,7 +470,7 @@ private:
template<typename KeyT, typename ValueT, typename KeyInfoT, typename ValueInfoT> template<typename KeyT, typename ValueT, typename KeyInfoT, typename ValueInfoT>
class DenseMapConstIterator : public DenseMapIterator<KeyT, ValueT, KeyInfoT> { class DenseMapConstIterator : public DenseMapIterator<KeyT, ValueT, KeyInfoT> {
public: public:
DenseMapConstIterator(void) : DenseMapIterator<KeyT, ValueT, KeyInfoT>() {} DenseMapConstIterator() : DenseMapIterator<KeyT, ValueT, KeyInfoT>() {}
DenseMapConstIterator(const std::pair<KeyT, ValueT> *Pos, DenseMapConstIterator(const std::pair<KeyT, ValueT> *Pos,
const std::pair<KeyT, ValueT> *E) const std::pair<KeyT, ValueT> *E)
: DenseMapIterator<KeyT, ValueT, KeyInfoT>(Pos, E) { : DenseMapIterator<KeyT, ValueT, KeyInfoT>(Pos, E) {

View File

@ -41,11 +41,11 @@ public:
/// setMemoryWritable - When code generation is in progress, /// setMemoryWritable - When code generation is in progress,
/// the code pages may need permissions changed. /// 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 /// setMemoryExecutable - When code generation is done and we're ready to
/// start execution, the code pages may need permissions changed. /// 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 /// setPoisonMemory - Setting this flag to true makes the memory manager
/// garbage values over freed memory. This is useful for testing and /// garbage values over freed memory. This is useful for testing and

View File

@ -45,7 +45,7 @@ namespace llvm {
/// Restores default error handling behaviour. /// Restores default error handling behaviour.
/// This must not be called between llvm_start_multithreaded() and /// This must not be called between llvm_start_multithreaded() and
/// llvm_stop_multithreaded(). /// llvm_stop_multithreaded().
void llvm_remove_error_handler(void); void llvm_remove_error_handler();
/// Reports a serious error, calling any installed 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 /// If no error handler is installed the default is to print the message to

View File

@ -250,8 +250,8 @@ protected:
void error_detected() { Error = true; } void error_detected() { Error = true; }
typedef char * iterator; typedef char * iterator;
iterator begin(void) { return OutBufStart; } iterator begin() { return OutBufStart; }
iterator end(void) { return OutBufCur; } iterator end() { return OutBufCur; }
//===--------------------------------------------------------------------===// //===--------------------------------------------------------------------===//
// Private Interface // Private Interface

View File

@ -35,7 +35,7 @@ namespace dont_use
// important to make the is_class<T>::value idiom zero cost. it // important to make the is_class<T>::value idiom zero cost. it
// evaluates to a constant 1 or 0 depending on whether the // evaluates to a constant 1 or 0 depending on whether the
// parameter T is a class or not (respectively). // 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(...); template<typename T> double is_class_helper(...);
} }

View File

@ -23,7 +23,7 @@ namespace sys {
/// This function returns true, if there is possible to use some external /// This function returns true, if there is possible to use some external
/// disassembler library. False otherwise. /// disassembler library. False otherwise.
bool hasDisassembler(void); bool hasDisassembler();
/// This function provides some "glue" code to call external disassembler /// This function provides some "glue" code to call external disassembler
/// libraries. /// libraries.

View File

@ -55,7 +55,7 @@ static ManagedStatic<std::map<const Function *, ExFunc> > ExportedFunctions;
static std::map<std::string, ExFunc> FuncNames; static std::map<std::string, ExFunc> FuncNames;
#ifdef USE_LIBFFI #ifdef USE_LIBFFI
typedef void (*RawFunc)(void); typedef void (*RawFunc)();
static ManagedStatic<std::map<const Function *, RawFunc> > RawFunctions; static ManagedStatic<std::map<const Function *, RawFunc> > RawFunctions;
#endif #endif

View File

@ -85,7 +85,7 @@ static void jit_exit(int Status) {
} }
// jit_atexit - Used to intercept the "atexit" library call. // 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... AtExitHandlers.push_back(Fn); // Take note of atexit handler...
return 0; // Always successful return 0; // Always successful
} }

View File

@ -606,11 +606,11 @@ namespace {
if (DwarfExceptionHandling) DE->setModuleInfo(Info); if (DwarfExceptionHandling) DE->setModuleInfo(Info);
} }
void setMemoryExecutable(void) { void setMemoryExecutable() {
MemMgr->setMemoryExecutable(); MemMgr->setMemoryExecutable();
} }
JITMemoryManager *getMemMgr(void) const { return MemMgr; } JITMemoryManager *getMemMgr() const { return MemMgr; }
private: private:
void *getPointerToGlobal(GlobalValue *GV, void *Reference, bool NoNeedStub); void *getPointerToGlobal(GlobalValue *GV, void *Reference, bool NoNeedStub);

View File

@ -521,14 +521,14 @@ namespace {
/// setMemoryWritable - When code generation is in progress, /// setMemoryWritable - When code generation is in progress,
/// the code pages may need permissions changed. /// the code pages may need permissions changed.
void setMemoryWritable(void) void setMemoryWritable()
{ {
for (unsigned i = 0, e = CodeSlabs.size(); i != e; ++i) for (unsigned i = 0, e = CodeSlabs.size(); i != e; ++i)
sys::Memory::setWritable(CodeSlabs[i]); sys::Memory::setWritable(CodeSlabs[i]);
} }
/// setMemoryExecutable - When code generation is done and we're ready to /// setMemoryExecutable - When code generation is done and we're ready to
/// start execution, the code pages may need permissions changed. /// start execution, the code pages may need permissions changed.
void setMemoryExecutable(void) void setMemoryExecutable()
{ {
for (unsigned i = 0, e = CodeSlabs.size(); i != e; ++i) for (unsigned i = 0, e = CodeSlabs.size(); i != e; ++i)
sys::Memory::setExecutable(CodeSlabs[i]); sys::Memory::setExecutable(CodeSlabs[i]);

View File

@ -35,7 +35,7 @@ void llvm_install_error_handler(llvm_error_handler_t handler,
ErrorHandlerUserData = user_data; ErrorHandlerUserData = user_data;
} }
void llvm_remove_error_handler(void) { void llvm_remove_error_handler() {
ErrorHandler = 0; ErrorHandler = 0;
} }

View File

@ -26,7 +26,7 @@
using namespace llvm; using namespace llvm;
bool llvm::sys::hasDisassembler(void) bool llvm::sys::hasDisassembler()
{ {
#if defined (__i386__) || defined (__amd64__) || defined (__x86_64__) #if defined (__i386__) || defined (__amd64__) || defined (__x86_64__)
// We have option to enable udis86 library. // We have option to enable udis86 library.

View File

@ -51,7 +51,7 @@ static TargetJITInfo::JITCompilerFn JITCompilerFunction;
// control over register saving and restoring. // control over register saving and restoring.
extern "C" { extern "C" {
#if defined(__arm__) #if defined(__arm__)
void ARMCompilationCallback(void); void ARMCompilationCallback();
asm( asm(
".text\n" ".text\n"
".align 2\n" ".align 2\n"

View File

@ -74,7 +74,7 @@ namespace {
void printSavedRegsBitmask(MachineFunction &MF); void printSavedRegsBitmask(MachineFunction &MF);
void printHex32(unsigned int Value); void printHex32(unsigned int Value);
const char *emitCurrentABIString(void); const char *emitCurrentABIString();
void emitFunctionStart(MachineFunction &MF); void emitFunctionStart(MachineFunction &MF);
void emitFunctionEnd(MachineFunction &MF); void emitFunctionEnd(MachineFunction &MF);
void emitFrameDirective(MachineFunction &MF); void emitFrameDirective(MachineFunction &MF);

View File

@ -86,7 +86,7 @@ getRegisterNumbering(unsigned RegEnum)
return 0; // Not reached return 0; // Not reached
} }
unsigned MipsRegisterInfo::getPICCallReg(void) { return Mips::T9; } unsigned MipsRegisterInfo::getPICCallReg() { return Mips::T9; }
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
// Callee Saved Registers methods // Callee Saved Registers methods

View File

@ -34,7 +34,7 @@ struct MipsRegisterInfo : public MipsGenRegisterInfo {
static unsigned getRegisterNumbering(unsigned RegEnum); static unsigned getRegisterNumbering(unsigned RegEnum);
/// Get PIC indirect call register /// Get PIC indirect call register
static unsigned getPICCallReg(void); static unsigned getPICCallReg();
/// Adjust the Mips stack frame. /// Adjust the Mips stack frame.
void adjustMipsStackFrame(MachineFunction &MF) const; void adjustMipsStackFrame(MachineFunction &MF) const;

View File

@ -194,7 +194,7 @@ static bool is_duplicate(const char *s1, const char *s2) {
/// printLibcallDecls - print the extern declarations for compiler /// printLibcallDecls - print the extern declarations for compiler
/// intrinsics. /// intrinsics.
/// ///
void PIC16AsmPrinter::printLibcallDecls(void) { void PIC16AsmPrinter::printLibcallDecls() {
// If no libcalls used, return. // If no libcalls used, return.
if (LibcallDecls.empty()) return; if (LibcallDecls.empty()) return;

View File

@ -56,7 +56,7 @@ namespace llvm {
void EmitRemainingAutos (); void EmitRemainingAutos ();
void EmitRomData (Module &M); void EmitRomData (Module &M);
void EmitFunctionFrame(MachineFunction &MF); void EmitFunctionFrame(MachineFunction &MF);
void printLibcallDecls(void); void printLibcallDecls();
protected: protected:
bool doInitialization(Module &M); bool doInitialization(Module &M);
bool doFinalization(Module &M); bool doFinalization(Module &M);

View File

@ -37,7 +37,7 @@ namespace XCore {
using namespace llvm; using namespace llvm;
XCoreInstrInfo::XCoreInstrInfo(void) XCoreInstrInfo::XCoreInstrInfo()
: TargetInstrInfoImpl(XCoreInsts, array_lengthof(XCoreInsts)), : TargetInstrInfoImpl(XCoreInsts, array_lengthof(XCoreInsts)),
RI(*this) { RI(*this) {
} }

View File

@ -22,7 +22,7 @@ namespace llvm {
class XCoreInstrInfo : public TargetInstrInfoImpl { class XCoreInstrInfo : public TargetInstrInfoImpl {
const XCoreRegisterInfo RI; const XCoreRegisterInfo RI;
public: public:
XCoreInstrInfo(void); XCoreInstrInfo();
/// getRegisterInfo - TargetInstrInfo is a superset of MRegister info. As /// getRegisterInfo - TargetInstrInfo is a superset of MRegister info. As
/// such, whenever a client has an instance of instruction info, it should /// such, whenever a client has an instance of instruction info, it should

View File

@ -12,7 +12,7 @@ namespace llvmc {
// Returns the platform specific directory separator via #ifdefs. // Returns the platform specific directory separator via #ifdefs.
// FIXME: This currently work on linux and windows only. It does not // FIXME: This currently work on linux and windows only. It does not
// work on other unices. // work on other unices.
static std::string GetDirSeparator(void) { static std::string GetDirSeparator() {
#ifdef __linux__ #ifdef __linux__
return "/"; return "/";
#else #else
@ -22,7 +22,7 @@ static std::string GetDirSeparator(void) {
namespace hooks { namespace hooks {
// Get the dir where c16 executables reside. // Get the dir where c16 executables reside.
std::string GetBinDir (void) { std::string GetBinDir() {
// Construct a Path object from the program name. // Construct a Path object from the program name.
void *P = (void*) (intptr_t) GetBinDir; void *P = (void*) (intptr_t) GetBinDir;
sys::Path ProgramFullPath sys::Path ProgramFullPath
@ -36,7 +36,7 @@ std::string GetBinDir (void) {
} }
// Get the Top-level Installation dir for c16. // Get the Top-level Installation dir for c16.
std::string GetInstallDir (void) { std::string GetInstallDir() {
sys::Path BinDirPath = sys::Path(GetBinDir()); sys::Path BinDirPath = sys::Path(GetBinDir());
// Go one more level up to get the install dir. // 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. // Get the dir where the c16 header files reside.
std::string GetStdHeadersDir (void) { std::string GetStdHeadersDir() {
return GetInstallDir() + "include"; return GetInstallDir() + "include";
} }
// Get the dir where the assembler header files reside. // Get the dir where the assembler header files reside.
std::string GetStdAsmHeadersDir (void) { std::string GetStdAsmHeadersDir() {
return GetInstallDir() + "inc"; return GetInstallDir() + "inc";
} }
// Get the dir where the linker scripts reside. // Get the dir where the linker scripts reside.
std::string GetStdLinkerScriptsDir (void) { std::string GetStdLinkerScriptsDir() {
return GetInstallDir() + "lkr"; return GetInstallDir() + "lkr";
} }
// Get the dir where startup code, intrinsics and lib reside. // Get the dir where startup code, intrinsics and lib reside.
std::string GetStdLibsDir (void) { std::string GetStdLibsDir() {
return GetInstallDir() + "lib"; return GetInstallDir() + "lib";
} }
} }

View File

@ -782,7 +782,7 @@ public:
// Clone - Clone this operator, replacing arguments with the new list // Clone - Clone this operator, replacing arguments with the new list
virtual OpInit *clone(std::vector<Init *> &Operands) = 0; 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; virtual Init *getOperand(int i) = 0;
// Fold - If possible, fold this to a simpler init. Return this if not // 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()); return new UnOpInit(getOpcode(), *Operands.begin(), getType());
} }
int getNumOperands(void) const { return 1; } int getNumOperands() const { return 1; }
Init *getOperand(int i) { Init *getOperand(int i) {
assert(i == 0 && "Invalid operand id for unary operator"); assert(i == 0 && "Invalid operand id for unary operator");
return getOperand(); return getOperand();
@ -864,7 +864,7 @@ public:
return new BinOpInit(getOpcode(), Operands[0], Operands[1], getType()); return new BinOpInit(getOpcode(), Operands[0], Operands[1], getType());
} }
int getNumOperands(void) const { return 2; } int getNumOperands() const { return 2; }
Init *getOperand(int i) { Init *getOperand(int i) {
assert((i == 0 || i == 1) && "Invalid operand id for binary operator"); assert((i == 0 || i == 1) && "Invalid operand id for binary operator");
if (i == 0) { if (i == 0) {
@ -909,7 +909,7 @@ public:
getType()); getType());
} }
int getNumOperands(void) const { return 3; } int getNumOperands() const { return 3; }
Init *getOperand(int i) { Init *getOperand(int i) {
assert((i == 0 || i == 1 || i == 2) && assert((i == 0 || i == 1 || i == 2) &&
"Invalid operand id for ternary operator"); "Invalid operand id for ternary operator");

View File

@ -974,7 +974,7 @@ Init *TGParser::ParseOperation(Record *CurRec) {
/// ///
/// OperatorType ::= '<' Type '>' /// OperatorType ::= '<' Type '>'
/// ///
RecTy *TGParser::ParseOperatorType(void) { RecTy *TGParser::ParseOperatorType() {
RecTy *Type = 0; RecTy *Type = 0;
if (Lex.getCode() != tgtok::less) { if (Lex.getCode() != tgtok::less) {