From ccbb3bd6e46e13c63ffbdc21684f9df513960688 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 23 Jul 2002 18:09:58 +0000 Subject: [PATCH] Raise pass requires an explicit TargetData member now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3020 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/gccas/gccas.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/gccas/gccas.cpp b/tools/gccas/gccas.cpp index fbb8f77afc6..e0b5cd51d1a 100644 --- a/tools/gccas/gccas.cpp +++ b/tools/gccas/gccas.cpp @@ -17,12 +17,16 @@ #include "llvm/Transforms/Scalar.h" #include "llvm/Analysis/Verifier.h" #include "llvm/Bytecode/WriteBytecodePass.h" +#include "llvm/Target/TargetData.h" #include "Support/CommandLine.h" #include "Support/Signals.h" #include #include using std::cerr; +// FIXME: This should eventually be parameterized... +static TargetData TD("opt target"); + static cl::opt InputFilename(cl::Positional, cl::desc(""), cl::Required); @@ -74,7 +78,7 @@ void AddConfiguredTransformationPasses(PassManager &PM) { // transformation to stop right before it runs. if (StopAtLevelRaise) return; - addPass(PM, createRaisePointerReferencesPass());// Eliminate casts + addPass(PM, createRaisePointerReferencesPass(TD));// Eliminate casts addPass(PM, createPromoteMemoryToRegister()); // Promote alloca's to regs // Disabling until this is fixed -- Vikram, 7/7/02. // addPass(PM, createReassociatePass()); // Reassociate expressions