From 9f776d426f8c0ba83b5038b588071aa60aae1a62 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 18 Aug 2002 00:37:14 +0000 Subject: [PATCH] Module's do not subclass from Value, so this code caused a segfault. llvm-svn: 3376 --- include/llvm/Assembly/PrintModulePass.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/include/llvm/Assembly/PrintModulePass.h b/include/llvm/Assembly/PrintModulePass.h index 08de60363f4..1dfb75e049d 100644 --- a/include/llvm/Assembly/PrintModulePass.h +++ b/include/llvm/Assembly/PrintModulePass.h @@ -12,8 +12,7 @@ #define LLVM_ASSEMBLY_PRINTMODULEPASS_H #include "llvm/Pass.h" -#include "llvm/Value.h" -#include +#include "llvm/Module.h" class PrintModulePass : public Pass { std::ostream *Out; // ostream to print on @@ -29,7 +28,7 @@ public: } bool run(Module &M) { - (*Out) << (Value&)M; + (*Out) << M; return false; }