[llvm-commits] [llvm] r82692 - /llvm/trunk/lib/VMCore/Instruction.cpp
Devang Patel
dpatel at apple.com
Thu Sep 24 09:19:12 PDT 2009
Author: dpatel
Date: Thu Sep 24 11:19:11 2009
New Revision: 82692
URL: http://llvm.org/viewvc/llvm-project?rev=82692&view=rev
Log:
Move parent assertion check before metadata deletion.
Modified:
llvm/trunk/lib/VMCore/Instruction.cpp
Modified: llvm/trunk/lib/VMCore/Instruction.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Instruction.cpp?rev=82692&r1=82691&r2=82692&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Instruction.cpp (original)
+++ llvm/trunk/lib/VMCore/Instruction.cpp Thu Sep 24 11:19:11 2009
@@ -50,11 +50,11 @@
// Out of line virtual method, so the vtable, etc has a home.
Instruction::~Instruction() {
+ assert(Parent == 0 && "Instruction still linked in the program!");
if (hasMetadata()) {
LLVMContext &Context = getContext();
Context.pImpl->TheMetadata.ValueIsDeleted(this);
}
- assert(Parent == 0 && "Instruction still linked in the program!");
}
More information about the llvm-commits
mailing list