Fix the build of the gold-plugin and examples.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231279 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola 2015-03-04 19:15:29 +00:00
parent b34736c630
commit 671944ff8f
7 changed files with 7 additions and 9 deletions

View File

@ -1972,7 +1972,7 @@ int main(int argc, char *argv[]) {
// Set up the optimizer pipeline.
// Start with registering info about how the
// target lays out data structures.
module->setDataLayout(executionEngine->getDataLayout());
module->setDataLayout(*executionEngine->getDataLayout());
// Optimizations turned on
#ifdef ADD_OPT_PASSES

View File

@ -560,7 +560,7 @@ void *MCJITHelper::getPointerToFunction(Function *F) {
// Set up the optimizer pipeline. Start with registering info about how the
// target lays out data structures.
OpenModule->setDataLayout(NewEngine->getDataLayout());
OpenModule->setDataLayout(*NewEngine->getDataLayout());
// Provide basic AliasAnalysis support for GVN.
FPM->add(createBasicAliasAnalysisPass());
// Promote allocas to registers.

View File

@ -913,7 +913,7 @@ int main() {
// Set up the optimizer pipeline. Start with registering info about how the
// target lays out data structures.
TheModule->setDataLayout(TheExecutionEngine->getDataLayout());
TheModule->setDataLayout(*TheExecutionEngine->getDataLayout());
// Provide basic AliasAnalysis support for GVN.
OurFPM.add(createBasicAliasAnalysisPass());
// Do simple "peephole" optimizations and bit-twiddling optzns.

View File

@ -1034,7 +1034,7 @@ int main() {
// Set up the optimizer pipeline. Start with registering info about how the
// target lays out data structures.
TheModule->setDataLayout(TheExecutionEngine->getDataLayout());
TheModule->setDataLayout(*TheExecutionEngine->getDataLayout());
// Provide basic AliasAnalysis support for GVN.
OurFPM.add(createBasicAliasAnalysisPass());
// Do simple "peephole" optimizations and bit-twiddling optzns.

View File

@ -1208,7 +1208,7 @@ int main() {
// Set up the optimizer pipeline. Start with registering info about how the
// target lays out data structures.
TheModule->setDataLayout(TheExecutionEngine->getDataLayout());
TheModule->setDataLayout(*TheExecutionEngine->getDataLayout());
// Provide basic AliasAnalysis support for GVN.
OurFPM.add(createBasicAliasAnalysisPass());
// Promote allocas to registers.

View File

@ -1459,7 +1459,7 @@ int main() {
// Set up the optimizer pipeline. Start with registering info about how the
// target lays out data structures.
TheModule->setDataLayout(TheExecutionEngine->getDataLayout());
TheModule->setDataLayout(*TheExecutionEngine->getDataLayout());
#if 0
// Provide basic AliasAnalysis support for GVN.
OurFPM.add(createBasicAliasAnalysisPass());

View File

@ -711,10 +711,9 @@ getModuleForFile(LLVMContext &Context, claimed_file &F,
static void runLTOPasses(Module &M, TargetMachine &TM) {
if (const DataLayout *DL = TM.getDataLayout())
M.setDataLayout(DL);
M.setDataLayout(*DL);
legacy::PassManager passes;
passes.add(new DataLayoutPass());
passes.add(createTargetTransformInfoWrapperPass(TM.getTargetIRAnalysis()));
PassManagerBuilder PMB;
@ -764,7 +763,6 @@ static void codegen(Module &M) {
saveBCFile(output_name + ".opt.bc", M);
legacy::PassManager CodeGenPasses;
CodeGenPasses.add(new DataLayoutPass());
SmallString<128> Filename;
int FD;