Module's do not subclass from Value, so this code caused a segfault.

llvm-svn: 3376
This commit is contained in:
Chris Lattner 2002-08-18 00:37:14 +00:00
parent e0f6af9bb2
commit 909b272663
1 changed files with 2 additions and 3 deletions

View File

@ -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;
}