BasicAliasAnalysis and FunctionAttrs were both
[oota-llvm.git] / include / llvm / Analysis / CaptureTracking.h
1 //===----- llvm/Analysis/CaptureTracking.h - Pointer capture ----*- 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 // This file contains routines that help determine which pointers are captured.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef LLVM_ANALYSIS_CAPTURETRACKING_H
15 #define LLVM_ANALYSIS_CAPTURETRACKING_H
16
17 namespace llvm {
18   class Value;
19
20   /// PointerMayBeCaptured - Return true if this pointer value may be captured
21   /// by the enclosing function (which is required to exist).  This routine can
22   /// be expensive, so consider caching the results.  The boolean ReturnCaptures
23   /// specifies whether returning the value (or part of it) from the function
24   /// counts as capturing it or not.
25   bool PointerMayBeCaptured(const Value *V, bool ReturnCaptures);
26
27 } // end namespace llvm
28
29 #endif