llvm.org GIT mirror llvm / a9ad041
This void is implicit in C++. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78848 91177308-0d34-0410-b5e6-96231b3b80d8 Dan Gohman 10 years ago
23 changed file(s) with 37 addition(s) and 37 deletion(s). Raw diff Collapse all Expand all
425425 protected:
426426 const BucketT *Ptr, *End;
427427 public:
428 DenseMapIterator(void) : Ptr(0), End(0) {}
428 DenseMapIterator() : Ptr(0), End(0) {}
429429
430430 DenseMapIterator(const BucketT *Pos, const BucketT *E) : Ptr(Pos), End(E) {
431431 AdvancePastEmptyBuckets();
469469 template
470470 class DenseMapConstIterator : public DenseMapIterator {
471471 public:
472 DenseMapConstIterator(void) : DenseMapIterator() {}
472 DenseMapConstIterator() : DenseMapIterator() {}
473473 DenseMapConstIterator(const std::pair *Pos,
474474 const std::pair *E)
475475 : DenseMapIterator(Pos, E) {
4040
4141 /// setMemoryWritable - When code generation is in progress,
4242 /// the code pages may need permissions changed.
43 virtual void setMemoryWritable(void) = 0;
43 virtual void setMemoryWritable() = 0;
4444
4545 /// setMemoryExecutable - When code generation is done and we're ready to
4646 /// start execution, the code pages may need permissions changed.
47 virtual void setMemoryExecutable(void) = 0;
47 virtual void setMemoryExecutable() = 0;
4848
4949 /// setPoisonMemory - Setting this flag to true makes the memory manager
5050 /// garbage values over freed memory. This is useful for testing and
4444 /// Restores default error handling behaviour.
4545 /// This must not be called between llvm_start_multithreaded() and
4646 /// llvm_stop_multithreaded().
47 void llvm_remove_error_handler(void);
47 void llvm_remove_error_handler();
4848
4949 /// Reports a serious error, calling any installed error handler.
5050 /// If no error handler is installed the default is to print the message to
249249 void error_detected() { Error = true; }
250250
251251 typedef char * iterator;
252 iterator begin(void) { return OutBufStart; }
253 iterator end(void) { return OutBufCur; }
252 iterator begin() { return OutBufStart; }
253 iterator end() { return OutBufCur; }
254254
255255 //===--------------------------------------------------------------------===//
256256 // Private Interface
3434 // important to make the is_class::value idiom zero cost. it
3535 // evaluates to a constant 1 or 0 depending on whether the
3636 // parameter T is a class or not (respectively).
37 template char is_class_helper(void(T::*)(void));
37 template char is_class_helper(void(T::*)());
3838 template double is_class_helper(...);
3939 }
4040
2222
2323 /// This function returns true, if there is possible to use some external
2424 /// disassembler library. False otherwise.
25 bool hasDisassembler(void);
25 bool hasDisassembler();
2626
2727 /// This function provides some "glue" code to call external disassembler
2828 /// libraries.
5454 static std::map FuncNames;
5555
5656 #ifdef USE_LIBFFI
57 typedef void (*RawFunc)(void);
57 typedef void (*RawFunc)();
5858 static ManagedStatic > RawFunctions;
5959 #endif
6060
8484 }
8585
8686 // jit_atexit - Used to intercept the "atexit" library call.
87 static int jit_atexit(void (*Fn)(void)) {
87 static int jit_atexit(void (*Fn)()) {
8888 AtExitHandlers.push_back(Fn); // Take note of atexit handler...
8989 return 0; // Always successful
9090 }
605605 if (DwarfExceptionHandling) DE->setModuleInfo(Info);
606606 }
607607
608 void setMemoryExecutable(void) {
608 void setMemoryExecutable() {
609609 MemMgr->setMemoryExecutable();
610610 }
611611
612 JITMemoryManager *getMemMgr(void) const { return MemMgr; }
612 JITMemoryManager *getMemMgr() const { return MemMgr; }
613613
614614 private:
615615 void *getPointerToGlobal(GlobalValue *GV, void *Reference, bool NoNeedStub);
520520
521521 /// setMemoryWritable - When code generation is in progress,
522522 /// the code pages may need permissions changed.
523 void setMemoryWritable(void)
523 void setMemoryWritable()
524524 {
525525 for (unsigned i = 0, e = CodeSlabs.size(); i != e; ++i)
526526 sys::Memory::setWritable(CodeSlabs[i]);
527527 }
528528 /// setMemoryExecutable - When code generation is done and we're ready to
529529 /// start execution, the code pages may need permissions changed.
530 void setMemoryExecutable(void)
530 void setMemoryExecutable()
531531 {
532532 for (unsigned i = 0, e = CodeSlabs.size(); i != e; ++i)
533533 sys::Memory::setExecutable(CodeSlabs[i]);
3434 ErrorHandlerUserData = user_data;
3535 }
3636
37 void llvm_remove_error_handler(void) {
37 void llvm_remove_error_handler() {
3838 ErrorHandler = 0;
3939 }
4040
2525
2626 using namespace llvm;
2727
28 bool llvm::sys::hasDisassembler(void)
28 bool llvm::sys::hasDisassembler()
2929 {
3030 #if defined (__i386__) || defined (__amd64__) || defined (__x86_64__)
3131 // We have option to enable udis86 library.
5050 // control over register saving and restoring.
5151 extern "C" {
5252 #if defined(__arm__)
53 void ARMCompilationCallback(void);
53 void ARMCompilationCallback();
5454 asm(
5555 ".text\n"
5656 ".align 2\n"
7373 void printSavedRegsBitmask(MachineFunction &MF);
7474 void printHex32(unsigned int Value);
7575
76 const char *emitCurrentABIString(void);
76 const char *emitCurrentABIString();
7777 void emitFunctionStart(MachineFunction &MF);
7878 void emitFunctionEnd(MachineFunction &MF);
7979 void emitFrameDirective(MachineFunction &MF);
8585 return 0; // Not reached
8686 }
8787
88 unsigned MipsRegisterInfo::getPICCallReg(void) { return Mips::T9; }
88 unsigned MipsRegisterInfo::getPICCallReg() { return Mips::T9; }
8989
9090 //===----------------------------------------------------------------------===//
9191 // Callee Saved Registers methods
3333 static unsigned getRegisterNumbering(unsigned RegEnum);
3434
3535 /// Get PIC indirect call register
36 static unsigned getPICCallReg(void);
36 static unsigned getPICCallReg();
3737
3838 /// Adjust the Mips stack frame.
3939 void adjustMipsStackFrame(MachineFunction &MF) const;
193193 /// printLibcallDecls - print the extern declarations for compiler
194194 /// intrinsics.
195195 ///
196 void PIC16AsmPrinter::printLibcallDecls(void) {
196 void PIC16AsmPrinter::printLibcallDecls() {
197197 // If no libcalls used, return.
198198 if (LibcallDecls.empty()) return;
199199
5555 void EmitRemainingAutos ();
5656 void EmitRomData (Module &M);
5757 void EmitFunctionFrame(MachineFunction &MF);
58 void printLibcallDecls(void);
58 void printLibcallDecls();
5959 protected:
6060 bool doInitialization(Module &M);
6161 bool doFinalization(Module &M);
3636
3737 using namespace llvm;
3838
39 XCoreInstrInfo::XCoreInstrInfo(void)
39 XCoreInstrInfo::XCoreInstrInfo()
4040 : TargetInstrInfoImpl(XCoreInsts, array_lengthof(XCoreInsts)),
4141 RI(*this) {
4242 }
2121 class XCoreInstrInfo : public TargetInstrInfoImpl {
2222 const XCoreRegisterInfo RI;
2323 public:
24 XCoreInstrInfo(void);
24 XCoreInstrInfo();
2525
2626 /// getRegisterInfo - TargetInstrInfo is a superset of MRegister info. As
2727 /// such, whenever a client has an instance of instruction info, it should
1111 // Returns the platform specific directory separator via #ifdefs.
1212 // FIXME: This currently work on linux and windows only. It does not
1313 // work on other unices.
14 static std::string GetDirSeparator(void) {
14 static std::string GetDirSeparator() {
1515 #ifdef __linux__
1616 return "/";
1717 #else
2121
2222 namespace hooks {
2323 // Get the dir where c16 executables reside.
24 std::string GetBinDir (void) {
24 std::string GetBinDir() {
2525 // Construct a Path object from the program name.
2626 void *P = (void*) (intptr_t) GetBinDir;
2727 sys::Path ProgramFullPath
3535 }
3636
3737 // Get the Top-level Installation dir for c16.
38 std::string GetInstallDir (void) {
38 std::string GetInstallDir() {
3939 sys::Path BinDirPath = sys::Path(GetBinDir());
4040
4141 // Go one more level up to get the install dir.
4545 }
4646
4747 // Get the dir where the c16 header files reside.
48 std::string GetStdHeadersDir (void) {
48 std::string GetStdHeadersDir() {
4949 return GetInstallDir() + "include";
5050 }
5151
5252 // Get the dir where the assembler header files reside.
53 std::string GetStdAsmHeadersDir (void) {
53 std::string GetStdAsmHeadersDir() {
5454 return GetInstallDir() + "inc";
5555 }
5656
5757 // Get the dir where the linker scripts reside.
58 std::string GetStdLinkerScriptsDir (void) {
58 std::string GetStdLinkerScriptsDir() {
5959 return GetInstallDir() + "lkr";
6060 }
6161
6262 // Get the dir where startup code, intrinsics and lib reside.
63 std::string GetStdLibsDir (void) {
63 std::string GetStdLibsDir() {
6464 return GetInstallDir() + "lib";
6565 }
6666 }
781781 // Clone - Clone this operator, replacing arguments with the new list
782782 virtual OpInit *clone(std::vector &Operands) = 0;
783783
784 virtual int getNumOperands(void) const = 0;
784 virtual int getNumOperands() const = 0;
785785 virtual Init *getOperand(int i) = 0;
786786
787787 // Fold - If possible, fold this to a simpler init. Return this if not
819819 return new UnOpInit(getOpcode(), *Operands.begin(), getType());
820820 }
821821
822 int getNumOperands(void) const { return 1; }
822 int getNumOperands() const { return 1; }
823823 Init *getOperand(int i) {
824824 assert(i == 0 && "Invalid operand id for unary operator");
825825 return getOperand();
863863 return new BinOpInit(getOpcode(), Operands[0], Operands[1], getType());
864864 }
865865
866 int getNumOperands(void) const { return 2; }
866 int getNumOperands() const { return 2; }
867867 Init *getOperand(int i) {
868868 assert((i == 0 || i == 1) && "Invalid operand id for binary operator");
869869 if (i == 0) {
908908 getType());
909909 }
910910
911 int getNumOperands(void) const { return 3; }
911 int getNumOperands() const { return 3; }
912912 Init *getOperand(int i) {
913913 assert((i == 0 || i == 1 || i == 2) &&
914914 "Invalid operand id for ternary operator");
973973 ///
974974 /// OperatorType ::= '<' Type '>'
975975 ///
976 RecTy *TGParser::ParseOperatorType(void) {
976 RecTy *TGParser::ParseOperatorType() {
977977 RecTy *Type = 0;
978978
979979 if (Lex.getCode() != tgtok::less) {