comparison gen/main.cpp @ 1569:755abafbf25d

Push the context through StructType::get. Requires LLVM >= 78258. Also remove old #if's.
author Benjamin Kramer <benny.kra@gmail.com>
date Thu, 06 Aug 2009 01:47:39 +0200
parents c03d164e96d9
children ab03cfb3a212
comparison
equal deleted inserted replaced
1568:a591aa6bd6dc 1569:755abafbf25d
481 for (unsigned i = 0; i != mAttrs.size(); ++i) 481 for (unsigned i = 0; i != mAttrs.size(); ++i)
482 Features.AddFeature(mAttrs[i]); 482 Features.AddFeature(mAttrs[i]);
483 FeaturesStr = Features.getString(); 483 FeaturesStr = Features.getString();
484 } 484 }
485 485
486 #if LLVM_REV < 77946
487 std::auto_ptr<llvm::TargetMachine> target(theTarget->createTargetMachine(mod, FeaturesStr));
488 #else
489 std::auto_ptr<llvm::TargetMachine> target(theTarget->createTargetMachine(mod.getTargetTriple(), FeaturesStr)); 486 std::auto_ptr<llvm::TargetMachine> target(theTarget->createTargetMachine(mod.getTargetTriple(), FeaturesStr));
490 #endif
491 assert(target.get() && "Could not allocate target machine!"); 487 assert(target.get() && "Could not allocate target machine!");
492 gTargetMachine = target.get(); 488 gTargetMachine = target.get();
493 gTargetData = gTargetMachine->getTargetData(); 489 gTargetData = gTargetMachine->getTargetData();
494 490
495 // get final data layout 491 // get final data layout