[llvm-commits] CVS: llvm/include/llvm/Type.h Constant.h
Chris Lattner
lattner at cs.uiuc.edu
Fri Nov 19 08:39:17 PST 2004
Changes in directory llvm/include/llvm:
Type.h updated: 1.66 -> 1.67
Constant.h updated: 1.18 -> 1.19
---
Log message:
Add static functions to clear singleton maps. Patch contributed by
Morten Ofstad!
---
Diffs of the changes: (+12 -1)
Index: llvm/include/llvm/Type.h
diff -u llvm/include/llvm/Type.h:1.66 llvm/include/llvm/Type.h:1.67
--- llvm/include/llvm/Type.h:1.66 Tue Oct 12 15:35:04 2004
+++ llvm/include/llvm/Type.h Fri Nov 19 10:39:04 2004
@@ -288,7 +288,7 @@
}
void dropRef() const {
- assert(isAbstract() && "Cannot drop a refernce to a non-abstract type!");
+ assert(isAbstract() && "Cannot drop a reference to a non-abstract type!");
assert(RefCount && "No objects are currently referencing this object!");
// If this is the last PATypeHolder using this object, and there are no
@@ -296,6 +296,12 @@
if (--RefCount == 0)
RefCountIsZero();
}
+
+ /// clearAllTypeMaps - This method frees all internal memory used by the
+ /// type subsystem, which can be used in environments where this memory is
+ /// otherwise reported as a leak.
+ static void clearAllTypeMaps();
+
private:
/// isSizedDerivedType - Derived types like structures and arrays are sized
/// iff all of the members of the type are sized as well. Since asking for
Index: llvm/include/llvm/Constant.h
diff -u llvm/include/llvm/Constant.h:1.18 llvm/include/llvm/Constant.h:1.19
--- llvm/include/llvm/Constant.h:1.18 Sat Oct 16 13:05:10 2004
+++ llvm/include/llvm/Constant.h Fri Nov 19 10:39:04 2004
@@ -92,6 +92,11 @@
"implemented for all constants that have operands!");
assert(0 && "Constants that do not have operands cannot be using 'From'!");
}
+
+ /// clearAllValueMaps - This method frees all internal memory used by the
+ /// constant subsystem, which can be used in environments where this memory
+ /// is otherwise reported as a leak.
+ static void clearAllValueMaps();
};
} // End llvm namespace
More information about the llvm-commits
mailing list