Changeset 625

Show
Ignore:
Timestamp:
08/11/08 09:50:06 (3 months ago)
Author:
weyrick
Message:

switch to i8* pointer type, and add in the verify

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/rphp/compiler/pDriver.cpp

    r624 r625  
    176176 
    177177    // RUNTIME startup/shutdown test 
    178     const llvm::Type* rEnginePointer = llvm::PointerType::get(llvm::OpaqueType::get(),0); 
     178    const llvm::Type* rEnginePointer = llvm::PointerType::get(llvm::Type::Int8Ty,0); 
    179179    llvm::FunctionType *runtimeStartupFuncType = llvm::FunctionType::get(rEnginePointer, std::vector<const llvm::Type*>(), false); 
    180180    llvm::Function *runtimeStartupFunc = llvm::Function::Create(runtimeStartupFuncType, llvm::Function::ExternalLinkage, "rphp_newRuntimeEngine", M); 
     
    207207    // Create the return instruction and add it to the basic block 
    208208    BB->getInstList().push_back(llvm::ReturnInst::Create(Add)); 
     209 
     210    if (llvm::verifyModule(*M, llvm::PrintMessageAction)) { 
     211        cerr << "module corrupt" << endl; 
     212        exit(-1); 
     213    } 
     214    else { 
     215        cerr << "module verified" << endl; 
     216    } 
    209217 
    210218    return M;