1 //===----- llvm/Analysis/CaptureTracking.h - Pointer capture ----*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file contains routines that help determine which pointers are captured.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_ANALYSIS_CAPTURETRACKING_H
15 #define LLVM_ANALYSIS_CAPTURETRACKING_H
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. The boolean StoreCaptures specified whether
25 /// storing the value (or part of it) into memory anywhere automatically
26 /// counts as capturing it or not.
27 bool PointerMayBeCaptured(const Value *V,
31 } // end namespace llvm