X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FCodeGen%2FUnreachableBlockElim.cpp;h=3ba920204ac153918b89e707d5ed3d31bdfd7a98;hb=55e283c71eaa0428b63c901d726c0666f985ce85;hp=e4fc9f8148dfd340a5441682934316b71dac8453;hpb=9525528a7dc5462b6374d38c81ba5c07b11741fe;p=oota-llvm.git diff --git a/lib/CodeGen/UnreachableBlockElim.cpp b/lib/CodeGen/UnreachableBlockElim.cpp index e4fc9f8148d..3ba920204ac 100644 --- a/lib/CodeGen/UnreachableBlockElim.cpp +++ b/lib/CodeGen/UnreachableBlockElim.cpp @@ -2,8 +2,8 @@ // // The LLVM Compiler Infrastructure // -// This file was developed by the LLVM research group and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // @@ -27,17 +27,21 @@ #include "llvm/Pass.h" #include "llvm/Type.h" #include "llvm/Support/CFG.h" -#include "llvm/Support/Visibility.h" +#include "llvm/Support/Compiler.h" #include "llvm/ADT/DepthFirstIterator.h" using namespace llvm; namespace { class VISIBILITY_HIDDEN UnreachableBlockElim : public FunctionPass { virtual bool runOnFunction(Function &F); + public: + static char ID; // Pass identification, replacement for typeid + UnreachableBlockElim() : FunctionPass((intptr_t)&ID) {} }; - RegisterOpt - X("unreachableblockelim", "Remove unreachable blocks from the CFG"); } +char UnreachableBlockElim::ID = 0; +static RegisterPass +X("unreachableblockelim", "Remove unreachable blocks from the CFG"); FunctionPass *llvm::createUnreachableBlockEliminationPass() { return new UnreachableBlockElim();