aboutsummaryrefslogtreecommitdiff
path: root/tools/analyze/analyze.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/analyze/analyze.cpp')
-rw-r--r--tools/analyze/analyze.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/analyze/analyze.cpp b/tools/analyze/analyze.cpp
index 83cfda2354..1119fccfa3 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());