[llvm] r259019 - SmallPtrSet: Make destructor available for inlining
Matthias Braun via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 27 20:49:14 PST 2016
Author: matze
Date: Wed Jan 27 22:49:14 2016
New Revision: 259019
URL: http://llvm.org/viewvc/llvm-project?rev=259019&view=rev
Log:
SmallPtrSet: Make destructor available for inlining
Modified:
llvm/trunk/include/llvm/ADT/SmallPtrSet.h
llvm/trunk/lib/Support/SmallPtrSet.cpp
Modified: llvm/trunk/include/llvm/ADT/SmallPtrSet.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/SmallPtrSet.h?rev=259019&r1=259018&r2=259019&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/SmallPtrSet.h (original)
+++ llvm/trunk/include/llvm/ADT/SmallPtrSet.h Wed Jan 27 22:49:14 2016
@@ -73,7 +73,10 @@ protected:
"Initial size must be a power of two!");
clear();
}
- ~SmallPtrSetImplBase();
+ ~SmallPtrSetImplBase() {
+ if (!isSmall())
+ free(CurArray);
+ }
public:
typedef unsigned size_type;
Modified: llvm/trunk/lib/Support/SmallPtrSet.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/SmallPtrSet.cpp?rev=259019&r1=259018&r2=259019&view=diff
==============================================================================
--- llvm/trunk/lib/Support/SmallPtrSet.cpp (original)
+++ llvm/trunk/lib/Support/SmallPtrSet.cpp Wed Jan 27 22:49:14 2016
@@ -296,8 +296,3 @@ void SmallPtrSetImplBase::swap(SmallPtrS
RHS.SmallArray);
std::swap(this->NumElements, RHS.NumElements);
}
-
-SmallPtrSetImplBase::~SmallPtrSetImplBase() {
- if (!isSmall())
- free(CurArray);
-}
More information about the llvm-commits
mailing list