LLVM API Documentation
#include <LeakDetector.h>
Static Public Member Functions | |
static void | addGarbageObject (void *Object) |
static void | removeGarbageObject (void *Object) |
static void | checkForGarbage (const std::string &Message) |
static void | addGarbageObject (const Value *Object) |
static void | removeGarbageObject (const Value *Object) |
Definition at line 31 of file LeakDetector.h.
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 36 of file LeakDetector.h.
Referenced by llvm::Argument::Argument(), llvm::BasicBlock::BasicBlock(), llvm::Function::Function(), llvm::GlobalVariable::GlobalVariable(), llvm::Instruction::Instruction(), and llvm::MachineInstr::MachineInstr().
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 46 of file LeakDetector.h.
Referenced by llvm::MachineBasicBlock::~MachineBasicBlock(), llvm::MachineInstr::~MachineInstr(), and llvm::Value::~Value().
static void llvm::LeakDetector::checkForGarbage | ( | 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 59 of file LeakDetector.h.
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 69 of file LeakDetector.h.
static void llvm::LeakDetector::removeGarbageObject | ( | const Value * | Object | ) | [inline, static] |
Definition at line 74 of file LeakDetector.h.