LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Namespaces | Functions
polymorphic_ptr.h File Reference
#include "llvm/Support/Compiler.h"
Include dependency graph for polymorphic_ptr.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  llvm::polymorphic_ptr< T >
 An owning, copyable polymorphic smart pointer. More...
 

Namespaces

 llvm
 List of target independent CodeGen pass IDs.
 

Functions

template<typename T >
void llvm::swap (polymorphic_ptr< T > &lhs, polymorphic_ptr< T > &rhs)
 
template<typename T , typename U >
bool llvm::operator== (const polymorphic_ptr< T > &lhs, const polymorphic_ptr< U > &rhs)
 
template<typename T , typename U >
bool llvm::operator!= (const polymorphic_ptr< T > &lhs, const polymorphic_ptr< U > &rhs)
 
template<typename T , typename U >
bool llvm::operator== (const polymorphic_ptr< T > &lhs, U *rhs)
 
template<typename T , typename U >
bool llvm::operator!= (const polymorphic_ptr< T > &lhs, U *rhs)
 
template<typename T , typename U >
bool llvm::operator== (T *lhs, const polymorphic_ptr< U > &rhs)
 
template<typename T , typename U >
bool llvm::operator!= (T *lhs, const polymorphic_ptr< U > &rhs)
 

Detailed Description

This file provides a polymorphic_ptr class template. See the class comments for details about this API, its intended use cases, etc.

The primary motivation here is to work around the necessity of copy semantics in C++98. This is typically used where any actual copies are incidental or unnecessary. As a consequence, it is expected to cease to be useful and be removed when we can directly rely on move-only types.

Definition in file polymorphic_ptr.h.