[llvm-commits] CVS: llvm/lib/Bytecode/Reader/Reader.h
Chris Lattner
lattner at cs.uiuc.edu
Mon Nov 15 13:55:48 PST 2004
Changes in directory llvm/lib/Bytecode/Reader:
Reader.h updated: 1.18 -> 1.19
---
Log message:
Cleanups. Null out pointer after freeing it for paranoia
---
Diffs of the changes: (+5 -5)
Index: llvm/lib/Bytecode/Reader/Reader.h
diff -u llvm/lib/Bytecode/Reader/Reader.h:1.18 llvm/lib/Bytecode/Reader/Reader.h:1.19
--- llvm/lib/Bytecode/Reader/Reader.h:1.18 Sun Nov 14 16:00:09 2004
+++ llvm/lib/Bytecode/Reader/Reader.h Mon Nov 15 15:55:06 2004
@@ -44,17 +44,17 @@
/// @{
public:
/// @brief Default constructor. By default, no handler is used.
- BytecodeReader(
- BytecodeHandler* h = 0
- ) {
+ BytecodeReader(BytecodeHandler* h = 0) {
decompressedBlock = 0;
Handler = h;
}
~BytecodeReader() {
freeState();
- if (decompressedBlock)
+ if (decompressedBlock) {
::free(decompressedBlock);
+ decompressedBlock = 0;
+ }
}
/// @}
@@ -411,7 +411,7 @@
inline const Type* getSanitizedType(unsigned& ID );
/// @brief Read in and get a sanitized type id
- inline const Type* BytecodeReader::readSanitizedType();
+ inline const Type* readSanitizedType();
/// @brief Converts a Type* to its type slot number
unsigned getTypeSlot(const Type *Ty);
More information about the llvm-commits
mailing list