aboutsummaryrefslogtreecommitdiff
path: root/tools/opt/opt.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-04-24 19:13:02 +0000
committerChris Lattner <sabre@nondot.org>2003-04-24 19:13:02 +0000
commit9c3b55ea9f5fe17c5713757e97aa62e0fb356dcf (patch)
treef64a1dd3de118ebd44058ff06e24e9095c20e8bb /tools/opt/opt.cpp
parent53a0c38b5fdb45974b74373ab17bf4d2fa27e292 (diff)
Make sure to create a target data that matches the Module's target properties.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5904 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/opt/opt.cpp')
-rw-r--r--tools/opt/opt.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp
index d03a65040b..0127c53480 100644
--- a/tools/opt/opt.cpp
+++ b/tools/opt/opt.cpp
@@ -113,6 +113,9 @@ int main(int argc, char **argv) {
//
PassManager Passes;
+ // Add an appropriate TargetData instance for this module...
+ Passes.add(new TargetData("opt", M.get()));
+
// Create a new optimization pass for each one specified on the command line
for (unsigned i = 0; i < OptimizationList.size(); ++i) {
const PassInfo *Opt = OptimizationList[i];