explicit ImmutableMap(const TreeTy* R) : Root(const_cast<TreeTy*>(R)) {
if (Root) { Root->retain(); }
}
+
ImmutableMap(const ImmutableMap &X) : Root(X.Root) {
if (Root) { Root->retain(); }
}
+
ImmutableMap &operator=(const ImmutableMap &X) {
if (Root != X.Root) {
if (X.Root) { X.Root->retain(); }
}
return *this;
}
+
~ImmutableMap() {
if (Root) { Root->release(); }
}
if (T) return &T->getValue().second;
}
- return 0;
+ return nullptr;
}
/// getMaxElement - Returns the <key,value> pair in the ImmutableMap for
} // end namespace llvm
-#endif
+#endif // LLVM_ADT_IMMUTABLEMAP_H