Displaying 2 results from an estimated 2 matches for "llvm_adt_condownershipptr_h".
2014 Sep 25
5
[LLVMdev] New type of smart pointer for LLVM
...ditional release -*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//===----------------------------------------------------------------------===//
#ifndef LLVM_ADT_CONDOWNERSHIPPTR_H
#define LLVM_ADT_CONDOWNERSHIPPTR_H
namespace llvm {
template<class T>
class CondOwnershipPtr {
T* Ptr;
bool Own;
void Delete() {
if (Ptr && !Own)
delete Ptr;
}
public:
CondOwnershipPtr() : Ptr(nullptr), Own(true) {}
explicit CondOwnershipPtr(T* p) : Ptr(p),...
2014 Sep 25
2
[LLVMdev] New type of smart pointer for LLVM
...LLVM Compiler Infrastructure
> > //
> > // This file is distributed under the University of Illinois Open Source
> > // License. See LICENSE.TXT for details.
> >
> //===----------------------------------------------------------------------===//
> >
> > #ifndef LLVM_ADT_CONDOWNERSHIPPTR_H
> > #define LLVM_ADT_CONDOWNERSHIPPTR_H
> >
> > namespace llvm {
> >
> > template<class T>
> > class CondOwnershipPtr {
> > T* Ptr;
> > bool Own;
> >
> > void Delete() {
> > if (Ptr && !Own)
> > de...