summaryrefslogtreecommitdiff
path: root/lib/IR/LeaksContext.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/IR/LeaksContext.h')
-rw-r--r--lib/IR/LeaksContext.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/IR/LeaksContext.h b/lib/IR/LeaksContext.h
index ea0d275253..52ac170459 100644
--- a/lib/IR/LeaksContext.h
+++ b/lib/IR/LeaksContext.h
@@ -34,10 +34,10 @@ struct PrinterTrait<Value> {
template <typename T>
struct LeakDetectorImpl {
explicit LeakDetectorImpl(const char* const name = "") :
- Cache(0), Name(name) { }
+ Cache(nullptr), Name(name) { }
void clear() {
- Cache = 0;
+ Cache = nullptr;
Ts.clear();
}
@@ -61,15 +61,15 @@ struct LeakDetectorImpl {
void removeGarbage(const T* o) {
if (o == Cache)
- Cache = 0; // Cache hit
+ Cache = nullptr; // Cache hit
else
Ts.erase(o);
}
bool hasGarbage(const std::string& Message) {
- addGarbage(0); // Flush the Cache
+ addGarbage(nullptr); // Flush the Cache
- assert(Cache == 0 && "No value should be cached anymore!");
+ assert(!Cache && "No value should be cached anymore!");
if (!Ts.empty()) {
errs() << "Leaked " << Name << " objects found: " << Message << ":\n";