From 9bb451e721b747e83835d50dfe5ba8485c375bcf 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3376 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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; }