summaryrefslogtreecommitdiff
path: root/include/llvm/ADT/IntrusiveRefCntPtr.h
diff options
context:
space:
mode:
authorMichael J. Spencer <bigcheesegs@gmail.com>2011-12-08 22:50:09 +0000
committerMichael J. Spencer <bigcheesegs@gmail.com>2011-12-08 22:50:09 +0000
commita81ac8f2b5d4f61f7bc353f95cc1d0a05266f51c (patch)
tree3f7b8dc504e57e877cf6d9897a619343c05c266a /include/llvm/ADT/IntrusiveRefCntPtr.h
parentc9b98ad7a7c3f2c098657a077a995912dce033e3 (diff)
downloadllvm-a81ac8f2b5d4f61f7bc353f95cc1d0a05266f51c.tar.gz
llvm-a81ac8f2b5d4f61f7bc353f95cc1d0a05266f51c.tar.bz2
llvm-a81ac8f2b5d4f61f7bc353f95cc1d0a05266f51c.tar.xz
Support/FileSystem: Implement recursive_directory_iterator and make
directory_iterator preserve InputIterator semantics on copy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146200 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT/IntrusiveRefCntPtr.h')
-rw-r--r--include/llvm/ADT/IntrusiveRefCntPtr.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/llvm/ADT/IntrusiveRefCntPtr.h b/include/llvm/ADT/IntrusiveRefCntPtr.h
index 8757f00d73..106daf4179 100644
--- a/include/llvm/ADT/IntrusiveRefCntPtr.h
+++ b/include/llvm/ADT/IntrusiveRefCntPtr.h
@@ -156,7 +156,12 @@ namespace llvm {
other.Obj = Obj;
Obj = tmp;
}
-
+
+ void reset() {
+ release();
+ Obj = 0;
+ }
+
void resetWithoutRelease() {
Obj = 0;
}