ReachableCode.h revision e5064ab8a8be7fbb8bb9727bea954c9fea7b40ab
1//===- ReachableCode.h -----------------------------------------*- C++ --*-===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// 9// 10// A flow-sensitive, path-insensitive analysis of unreachable code. 11// 12//===----------------------------------------------------------------------===// 13 14#ifndef LLVM_CLANG_REACHABLECODE_H 15#define LLVM_CLANG_REACHABLECODE_H 16 17//===----------------------------------------------------------------------===// 18// Forward declarations. 19//===----------------------------------------------------------------------===// 20 21namespace llvm { 22class BitVector; 23} // end llvm namespace 24 25namespace clang { 26class CFGBlock; 27} // end clang namespace 28 29//===----------------------------------------------------------------------===// 30// API. 31//===----------------------------------------------------------------------===// 32 33namespace clang { 34 35/// ScanReachableFromBlock - Mark all blocks reachable from Start. 36/// Returns the total number of blocks that were marked reachable. 37unsigned ScanReachableFromBlock(const CFGBlock &B, llvm::BitVector &Reachable); 38 39} // end clang namespace 40 41#endif 42