LLVM API Documentation

Static Public Member Functions
llvm::LeakDetector Struct Reference

#include <LeakDetector.h>

List of all members.

Static Public Member Functions

static void addGarbageObject (void *Object)
static void removeGarbageObject (void *Object)
static void checkForGarbage (LLVMContext &C, const std::string &Message)
static void addGarbageObject (const Value *Object)
static void removeGarbageObject (const Value *Object)

Detailed Description

Definition at line 32 of file LeakDetector.h.


Member Function Documentation

static void llvm::LeakDetector::addGarbageObject ( void *  Object) [inline, static]

addGarbageObject - Add a pointer to the internal set of "garbage" object pointers. This should be called when objects are created, or if they are taken out of an owning collection.

Definition at line 37 of file LeakDetector.h.

Referenced by llvm::Argument::Argument(), llvm::MDNode::getTemporary(), llvm::GlobalVariable::GlobalVariable(), and llvm::Instruction::Instruction().

static void llvm::LeakDetector::addGarbageObject ( const Value Object) [inline, static]

Overload the normal methods to work better with Value*'s because they are by far the most common in LLVM. This does not affect the actual functioning of this class, it just makes the warning messages nicer.

Definition at line 70 of file LeakDetector.h.

static void llvm::LeakDetector::checkForGarbage ( LLVMContext C,
const std::string &  Message 
) [inline, static]

checkForGarbage - Traverse the internal representation of garbage pointers. If there are any pointers that have been add'ed, but not remove'd, big obnoxious warnings about memory leaks are issued.

The specified message will be printed indicating when the check was performed.

Definition at line 60 of file LeakDetector.h.

static void llvm::LeakDetector::removeGarbageObject ( void *  Object) [inline, static]

removeGarbageObject - Remove a pointer from our internal representation of our "garbage" objects. This should be called when an object is added to an "owning" collection.

Definition at line 47 of file LeakDetector.h.

Referenced by llvm::MDNode::deleteTemporary(), and llvm::Value::~Value().

static void llvm::LeakDetector::removeGarbageObject ( const Value Object) [inline, static]

Definition at line 75 of file LeakDetector.h.


The documentation for this struct was generated from the following files: