LLVM API Documentation
#include <OwningPtr.h>
Public Member Functions | |
OwningPtr (T *P=0) | |
~OwningPtr () | |
void | reset (T *P=0) |
T * | take () |
T & | operator* () const |
T * | operator-> () const |
T * | get () const |
LLVM_EXPLICIT | operator bool () const |
bool | operator! () const |
bool | isValid () const |
void | swap (OwningPtr &RHS) |
OwningPtr smart pointer - OwningPtr mimics a built-in pointer except that it guarantees deletion of the object pointed to, either on destruction of the OwningPtr or via an explicit reset(). Once created, ownership of the pointee object can be taken away from OwningPtr by using the take method.
Definition at line 28 of file OwningPtr.h.
|
inlineexplicit |
Definition at line 33 of file OwningPtr.h.
|
inline |
Definition at line 44 of file OwningPtr.h.
|
inline |
Definition at line 72 of file OwningPtr.h.
Referenced by llvm::LLVMTargetMachine::addPassesToEmitMC(), llvm::DWARFUnit::buildAddressRangeTable(), llvm::FileOutputBuffer::create(), llvm::SpecialCaseList::create(), llvm::MCJIT::generateCodeForModule(), llvm::DWARFUnit::getInlinedChainForAddress(), LTOModule::getLLVVMModule(), llvm::ParseAssembly(), llvm::DebugIR::runOnModule(), and llvm::yaml::Input::setCurrentDocument().
|
inline |
Definition at line 75 of file OwningPtr.h.
|
inline |
Definition at line 73 of file OwningPtr.h.
|
inline |
Definition at line 74 of file OwningPtr.h.
|
inline |
Definition at line 66 of file OwningPtr.h.
|
inline |
Definition at line 71 of file OwningPtr.h.
|
inline |
reset - Change the current pointee to the specified pointer. Note that calling this with any pointer (including a null pointer) deletes the current pointer.
Definition at line 51 of file OwningPtr.h.
Referenced by llvm::LLVMTargetMachine::addPassesToEmitMC(), llvm::DWARFUnit::buildAddressRangeTable(), llvm::DWARFUnit::clear(), llvm::zlib::compress(), llvm::FileOutputBuffer::create(), llvm::createDefaultPBQPRegisterAllocator(), llvm::object::ObjectFile::createMachOObjectFile(), llvm::MCJIT::generateCodeForModule(), llvm::object::MachOUniversalBinary::ObjectForArch::getAsObjectFile(), llvm::object::Archive::Child::getMemoryBuffer(), getMemoryBufferForStream(), getOpenFileImpl(), llvm::yaml::Input::setCurrentDocument(), llvm::zlib::uncompress(), and llvm::yaml2mcmodule().
|
inline |
Definition at line 77 of file OwningPtr.h.
Referenced by llvm::object::createBinary(), llvm::object::Archive::Child::getAsBinary(), getOpenFileImpl(), and llvm::swap().
|
inline |
take - Reset the owning pointer to null and return its pointer. This does not delete the pointer before returning it.
Definition at line 60 of file OwningPtr.h.
Referenced by llvm::SourceMgr::AddIncludeFile(), llvm::LLVMTargetMachine::addPassesToEmitMC(), llvm::PBQPBuilder::build(), llvm::PBQPBuilderWithCoalescing::build(), LTOCodeGenerator::compile(), llvm::FileOutputBuffer::create(), llvm::SpecialCaseList::create(), llvm::EngineBuilder::create(), llvm::object::createBinary(), llvm::object::ObjectFile::createMachOObjectFile(), llvm::object::ObjectFile::createObjectFile(), llvm::DWARFContextInMemory::DWARFContextInMemory(), llvm::MCJIT::emitObject(), llvm::MCJIT::generateCodeForModule(), llvm::object::Archive::Child::getAsBinary(), llvm::getLazyIRFileModule(), LTOModule::isBitcodeFileForTarget(), LLVMCreateMemoryBufferWithContentsOfFile(), LLVMCreateMemoryBufferWithSTDIN(), llvm::RuntimeDyldImpl::loadObject(), LTOModule::makeLTOModule(), llvm::ParseAssembly(), llvm::ParseAssemblyFile(), llvm::ParseIRFile(), llvm::MCObjectDisassembler::setFallbackRegion(), llvm::MCDisassembler::setSymbolizer(), and llvm::TableGenMain().