diff options
author | Chris Lattner <sabre@nondot.org> | 2002-08-18 00:37:14 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-08-18 00:37:14 +0000 |
commit | 9bb451e721b747e83835d50dfe5ba8485c375bcf (patch) | |
tree | 76b7f5f3c0dae32a6e8a94401ef3cb7ee0f5388a /include/llvm/Assembly/PrintModulePass.h | |
parent | 9da0715aa4ec1cc9181b786c100fa3dfabe9a404 (diff) |
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
Diffstat (limited to 'include/llvm/Assembly/PrintModulePass.h')
-rw-r--r-- | include/llvm/Assembly/PrintModulePass.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/include/llvm/Assembly/PrintModulePass.h b/include/llvm/Assembly/PrintModulePass.h index 08de60363f..1dfb75e049 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 <iostream> +#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; } |