Make DISABLE_SMART_POINTERS work, again

llvm-svn: 70443
This commit is contained in:
Douglas Gregor 2009-04-29 23:37:31 +00:00
parent 334df667a3
commit d1a602c628
1 changed files with 8 additions and 1 deletions

View File

@ -379,6 +379,12 @@ namespace clang {
return Node;
}
/// Take outside ownership of the raw pointer and cast it down.
template<typename T>
T *takeAs() {
return static_cast<T*>(Node);
}
/// Alias for interface familiarity with unique_ptr.
void * release() {
return take();
@ -698,8 +704,9 @@ namespace clang {
unsigned size() const { return Count; }
void reset(void **args, bool *argIsType, unsigned count) {
#if !defined(DISABLE_SMART_POINTERS)
destroy();
#endif
Args = args;
ArgIsType = argIsType;
Count = count;