mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-10-20 09:24:58 +00:00
Cleanups. Null out pointer after freeing it for paranoia
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17855 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
86c9365761
commit
1992522abd
@ -44,17 +44,17 @@ class BytecodeReader : public ModuleProvider {
|
||||
/// @{
|
||||
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 @@ private:
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user