comparison gen/main.cpp @ 1552:08c8ef491c97

getClosestStaticTargetForModule was replaced with lookupTarget Build fix for LLVM r77111.
author Benjamin Kramer <benny.kra@gmail.com>
date Tue, 28 Jul 2009 15:26:21 +0200
parents f9660d9cf2ba
children 3adcb70700cb
comparison
equal deleted inserted replaced
1551:ed0feda76820 1552:08c8ef491c97
440 const llvm::Target *theTarget = NULL; 440 const llvm::Target *theTarget = NULL;
441 // Check whether the user has explicitly specified an architecture to compile for. 441 // Check whether the user has explicitly specified an architecture to compile for.
442 if (mArch.empty()) 442 if (mArch.empty())
443 { 443 {
444 std::string Err; 444 std::string Err;
445 theTarget = llvm::TargetRegistry::getClosestStaticTargetForModule(mod, Err); 445 theTarget = llvm::TargetRegistry::lookupTarget(mod.getTargetTriple(), false, false, Err);
446 if (theTarget == 0) 446 if (theTarget == 0)
447 { 447 {
448 error("failed to auto-select target: %s, please use the -march option", Err.c_str()); 448 error("failed to auto-select target: %s, please use the -march option", Err.c_str());
449 fatal(); 449 fatal();
450 } 450 }