Fix PR 1497
authorDevang Patel <dpatel@apple.com>
Tue, 5 Jun 2007 20:24:36 +0000 (20:24 +0000)
committerDevang Patel <dpatel@apple.com>
Tue, 5 Jun 2007 20:24:36 +0000 (20:24 +0000)
Use separate pass id for CFGOnlyPrinter.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37439 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/CFGPrinter.cpp

index cc0f6b43182ada94850abd5d1efc632a067db1fa..74666664d88d51f83876218899ff2da661da88a8 100644 (file)
@@ -135,6 +135,7 @@ namespace {
   struct VISIBILITY_HIDDEN CFGPrinter : public FunctionPass {
     static char ID; // Pass identification, replacement for typeid
     CFGPrinter() : FunctionPass((intptr_t)&ID) {}
+    CFGPrinter(intptr_t pid) : FunctionPass(pid) {}
 
     virtual bool runOnFunction(Function &F) {
       std::string Filename = "cfg." + F.getName() + ".dot";
@@ -162,6 +163,7 @@ namespace {
 
   struct VISIBILITY_HIDDEN CFGOnlyPrinter : public CFGPrinter {
     static char ID; // Pass identification, replacement for typeid
+    CFGOnlyPrinter() : CFGPrinter((intptr_t)&ID) {}
     virtual bool runOnFunction(Function &F) {
       bool OldCFGOnly = CFGOnly;
       CFGOnly = true;