[llvm-commits] [llvm] r128238 - in /llvm/trunk: lib/Target/ARM/Disassembler/ARMDisassembler.cpp test/MC/Disassembler/ARM/invalid-CPS3p-arm.txt test/MC/Disassembler/ARM/invalid-VLDMSDB-arm.txt
Benjamin Kramer
benny.kra at googlemail.com
Thu Mar 24 14:14:28 PDT 2011
Author: d0k
Date: Thu Mar 24 16:14:28 2011
New Revision: 128238
URL: http://llvm.org/viewvc/llvm-project?rev=128238&view=rev
Log:
Plug a leak in the arm disassembler and put the tests back.
Added:
llvm/trunk/test/MC/Disassembler/ARM/invalid-CPS3p-arm.txt
- copied unchanged from r128234, llvm/trunk/test/MC/Disassembler/ARM/invalid-CPS3p-arm.txt
llvm/trunk/test/MC/Disassembler/ARM/invalid-VLDMSDB-arm.txt
- copied unchanged from r128234, llvm/trunk/test/MC/Disassembler/ARM/invalid-VLDMSDB-arm.txt
Modified:
llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp
Modified: llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp?rev=128238&r1=128237&r2=128238&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp (original)
+++ llvm/trunk/lib/Target/ARM/Disassembler/ARMDisassembler.cpp Thu Mar 24 16:14:28 2011
@@ -18,6 +18,7 @@
#include "ARMDisassembler.h"
#include "ARMDisassemblerCore.h"
+#include "llvm/ADT/OwningPtr.h"
#include "llvm/MC/EDInstInfo.h"
#include "llvm/MC/MCInst.h"
#include "llvm/Target/TargetRegistry.h"
@@ -384,15 +385,13 @@
showBitVector(errs(), insn);
});
- ARMBasicMCBuilder *Builder = CreateMCBuilder(Opcode, Format);
+ OwningPtr<ARMBasicMCBuilder> Builder(CreateMCBuilder(Opcode, Format));
if (!Builder)
return false;
if (!Builder->Build(MI, insn))
return false;
- delete Builder;
-
return true;
}
More information about the llvm-commits
mailing list