2009-01-18 12:19:30 +00:00
|
|
|
//===----- llvm/Analysis/CaptureTracking.h - Pointer capture ----*- C++ -*-===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This file contains routines that help determine which pointers are captured.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef LLVM_ANALYSIS_CAPTURETRACKING_H
|
|
|
|
#define LLVM_ANALYSIS_CAPTURETRACKING_H
|
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
class Value;
|
|
|
|
|
|
|
|
/// PointerMayBeCaptured - Return true if this pointer value may be captured
|
|
|
|
/// by the enclosing function (which is required to exist). This routine can
|
|
|
|
/// be expensive, so consider caching the results. The boolean ReturnCaptures
|
|
|
|
/// specifies whether returning the value (or part of it) from the function
|
2009-11-19 21:57:48 +00:00
|
|
|
/// counts as capturing it or not. The boolean StoreCaptures specified whether
|
|
|
|
/// storing the value (or part of it) into memory anywhere automatically
|
2009-01-18 12:19:30 +00:00
|
|
|
/// counts as capturing it or not.
|
2009-11-19 21:57:48 +00:00
|
|
|
bool PointerMayBeCaptured(const Value *V,
|
|
|
|
bool ReturnCaptures,
|
|
|
|
bool StoreCaptures);
|
2009-01-18 12:19:30 +00:00
|
|
|
|
|
|
|
} // end namespace llvm
|
|
|
|
|
|
|
|
#endif
|