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.
| llvm::OwningPtr< T >::OwningPtr | ( | T * | P = 0 | ) | [inline, explicit] |
Definition at line 33 of file OwningPtr.h.
| llvm::OwningPtr< T >::~OwningPtr | ( | ) | [inline] |
Definition at line 44 of file OwningPtr.h.
| T* llvm::OwningPtr< T >::get | ( | ) | const [inline] |
Definition at line 72 of file OwningPtr.h.
Referenced by llvm::LLVMTargetMachine::addPassesToEmitMC(), llvm::FileOutputBuffer::create(), llvm::LLVMDisasmContext::getAsmInfo(), llvm::CompileUnit::getCUDie(), llvm::LLVMDisasmContext::getDisAsm(), llvm::MipsTargetMachine::getFrameLowering(), llvm::ThumbTargetMachine::getFrameLowering(), llvm::AMDGPUTargetMachine::getInstrInfo(), llvm::MipsTargetMachine::getInstrInfo(), llvm::LLVMDisasmContext::getInstrInfo(), llvm::ThumbTargetMachine::getInstrInfo(), llvm::LLVMDisasmContext::getIP(), llvm::Module::getMaterializer(), llvm::LLVMDisasmContext::getRegisterInfo(), llvm::LLVMDisasmContext::getSubtargetInfo(), llvm::AMDGPUTargetMachine::getTargetLowering(), llvm::MipsTargetMachine::getTargetLowering(), llvm::MCJIT::loadObject(), llvm::yaml::document_iterator::operator*(), llvm::ParseAssembly(), llvm::yaml::Input::setCurrentDocument(), and llvm::MCJIT::~MCJIT().
| bool llvm::OwningPtr< T >::isValid | ( | ) | const [inline] |
Definition at line 75 of file OwningPtr.h.
| LLVM_EXPLICIT llvm::OwningPtr< T >::operator bool | ( | ) | const [inline] |
Definition at line 73 of file OwningPtr.h.
| bool llvm::OwningPtr< T >::operator! | ( | ) | const [inline] |
Definition at line 74 of file OwningPtr.h.
| T& llvm::OwningPtr< T >::operator* | ( | ) | const [inline] |
Definition at line 66 of file OwningPtr.h.
| T* llvm::OwningPtr< T >::operator-> | ( | ) | const [inline] |
Definition at line 71 of file OwningPtr.h.
| void llvm::OwningPtr< T >::reset | ( | T * | P = 0 | ) | [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::AMDGPUTargetMachine::AMDGPUTargetMachine(), llvm::yaml::Stream::begin(), llvm::BitstreamReader::BitstreamReader(), llvm::FileOutputBuffer::create(), llvm::createDefaultPBQPRegisterAllocator(), llvm::ObjectBufferStream::flush(), llvm::object::MachOUniversalBinary::ObjectForArch::getAsObjectFile(), llvm::object::Archive::Child::getMemoryBuffer(), getMemoryBufferForStream(), llvm::MemoryBuffer::getOpenFile(), llvm::BitstreamReader::init(), llvm::LLVMDisasmContext::LLVMDisasmContext(), llvm::MCJIT::loadObject(), llvm::Module::MaterializeAllPermanently(), llvm::yaml::document_iterator::operator++(), llvm::MemoryDependenceAnalysis::runOnFunction(), llvm::yaml::Input::setCurrentDocument(), llvm::MipsTargetMachine::setHelperClassesMips16(), llvm::MipsTargetMachine::setHelperClassesMipsSE(), llvm::LLVMDisasmContext::setIP(), llvm::Module::setMaterializer(), llvm::MCDisassembler::setSymbolizer(), and llvm::MCDisassembler::setupForSymbolicDisassembly().
| void llvm::OwningPtr< T >::swap | ( | OwningPtr< T > & | RHS | ) | [inline] |
Definition at line 77 of file OwningPtr.h.
Referenced by llvm::object::createBinary(), llvm::object::Archive::Child::getAsBinary(), llvm::MemoryBuffer::getOpenFile(), llvm::MipsTargetMachine::setHelperClassesMips16(), llvm::MipsTargetMachine::setHelperClassesMipsSE(), and llvm::swap().
| T* llvm::OwningPtr< T >::take | ( | ) | [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::FileInfo::addLineCount(), llvm::LLVMTargetMachine::addPassesToEmitMC(), llvm::BlackList::BlackList(), llvm::PBQPBuilder::build(), llvm::PBQPBuilderWithCoalescing::build(), llvm::FileOutputBuffer::create(), llvm::EngineBuilder::create(), llvm::object::createBinary(), llvm::object::ObjectFile::createObjectFile(), llvm::DWARFContextInMemory::DWARFContextInMemory(), llvm::MCJIT::emitObject(), llvm::object::Archive::Child::getAsBinary(), llvm::getLazyIRFileModule(), LLVMCreateMemoryBufferWithContentsOfFile(), LLVMCreateMemoryBufferWithSTDIN(), llvm::MCJIT::loadObject(), llvm::RuntimeDyldImpl::loadObject(), llvm::ParseAssembly(), llvm::ParseAssemblyFile(), llvm::ParseIRFile(), llvm::FileInfo::print(), llvm::MCDisassembler::setSymbolizer(), and llvm::TableGenMain().