From 09f162ca6a10446d6377b957f3a58ac92ce38306 Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Tue, 1 May 2007 21:15:47 +0000 Subject: Do not use typeinfo to identify pass in pass manager. llvm-svn: 36632 --- llvm/lib/CodeGen/ELFWriter.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'llvm/lib/CodeGen/ELFWriter.cpp') diff --git a/llvm/lib/CodeGen/ELFWriter.cpp b/llvm/lib/CodeGen/ELFWriter.cpp index ffc0a929f31..ce534092ba3 100644 --- a/llvm/lib/CodeGen/ELFWriter.cpp +++ b/llvm/lib/CodeGen/ELFWriter.cpp @@ -47,6 +47,7 @@ #include using namespace llvm; +const int ELFWriter::ID = 0; /// AddELFWriter - Concrete function to add the ELF writer to the function pass /// manager. MachineCodeEmitter *llvm::AddELFWriter(FunctionPassManager &FPM, @@ -176,7 +177,8 @@ bool ELFCodeEmitter::finishFunction(MachineFunction &F) { // ELFWriter Implementation //===----------------------------------------------------------------------===// -ELFWriter::ELFWriter(std::ostream &o, TargetMachine &tm) : O(o), TM(tm) { +ELFWriter::ELFWriter(std::ostream &o, TargetMachine &tm) + : MachineFunctionPass((intptr_t)&ID), O(o), TM(tm) { e_flags = 0; // e_flags defaults to 0, no flags. is64Bit = TM.getTargetData()->getPointerSizeInBits() == 64; -- cgit v1.2.3