diff options
author | Chris Lattner <sabre@nondot.org> | 2003-04-24 19:13:02 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-04-24 19:13:02 +0000 |
commit | 9c3b55ea9f5fe17c5713757e97aa62e0fb356dcf (patch) | |
tree | f64a1dd3de118ebd44058ff06e24e9095c20e8bb /tools/analyze/analyze.cpp | |
parent | 53a0c38b5fdb45974b74373ab17bf4d2fa27e292 (diff) | |
download | external_llvm-9c3b55ea9f5fe17c5713757e97aa62e0fb356dcf.zip external_llvm-9c3b55ea9f5fe17c5713757e97aa62e0fb356dcf.tar.gz external_llvm-9c3b55ea9f5fe17c5713757e97aa62e0fb356dcf.tar.bz2 |
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/analyze/analyze.cpp')
-rw-r--r-- | tools/analyze/analyze.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/analyze/analyze.cpp b/tools/analyze/analyze.cpp index 83cfda2..1119fcc 100644 --- a/tools/analyze/analyze.cpp +++ b/tools/analyze/analyze.cpp @@ -15,6 +15,7 @@ #include "llvm/Bytecode/Reader.h" #include "llvm/Assembly/Parser.h" #include "llvm/Analysis/Verifier.h" +#include "llvm/Target/TargetData.h" #include "llvm/Support/PassNameParser.h" #include "Support/Timer.h" #include <algorithm> @@ -126,6 +127,9 @@ int main(int argc, char **argv) { // PassManager Passes; + // Add an appropriate TargetData instance for this module... + Passes.add(new TargetData("analyze", CurMod)); + // Make sure the input LLVM is well formed. Passes.add(createVerifierPass()); |