Paul Vario
2015-Feb-24 03:29 UTC
[LLVMdev] An asserting value handle still pointed to this value! (Value.cpp:633)
Hi, When I try using eraseFromParent to delete a function declaration (use_empty), the following error was trigger: While deleting: void (%"class.Concurrency::index"*)* %_ZN11Concurrency5indexILi1EE21__cxxamp_opencl_indexEv An asserting value handle still pointed to this value! UNREACHABLE executed at /home/pvario/cppamp/src/compiler/lib/IR/Value.cpp:633! What could be the cause of this? Thanks in advance. Best Regards, Paul -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150223/d39dbbf3/attachment.html>
Duncan P. N. Exon Smith
2015-Feb-24 04:35 UTC
[LLVMdev] An asserting value handle still pointed to this value! (Value.cpp:633)
> On 2015 Feb 23, at 19:29, Paul Vario <paul.paul.mit at gmail.com> wrote: > > Hi, > > When I try using eraseFromParent to delete a function declaration (use_empty), the following error was trigger: > > While deleting: void (%"class.Concurrency::index"*)* %_ZN11Concurrency5indexILi1EE21__cxxamp_opencl_indexEv > > An asserting value handle still pointed to this value! > UNREACHABLE executed at /home/pvario/cppamp/src/compiler/lib/IR/Value.cpp:633! > > What could be the cause of this? Thanks in advance.This means that there's a value handle referencing that function. I recommend looking at what's going on in a debugger. A quick `git grep` says that in LLVM ToT there are references to `AssertingVH` in these files: $ git grep -l AssertingVH include/llvm/Analysis/AliasSetTracker.h include/llvm/Analysis/CallGraph.h include/llvm/Analysis/ScalarEvolution.h include/llvm/Analysis/ScalarEvolutionExpander.h include/llvm/ExecutionEngine/ExecutionEngine.h include/llvm/IR/IRBuilder.h include/llvm/IR/ValueHandle.h lib/Analysis/LazyValueInfo.cpp lib/CodeGen/MachineModuleInfo.cpp lib/ExecutionEngine/ExecutionEngine.cpp lib/IR/Value.cpp lib/Transforms/IPO/MergeFunctions.cpp lib/Transforms/Scalar/IndVarSimplify.cpp lib/Transforms/Scalar/JumpThreading.cpp lib/Transforms/Scalar/Reassociate.cpp lib/Transforms/Utils/Local.cpp unittests/IR/ValueHandleTest.cpp $ cd tools/clang/ $ git grep -l AssertingVH lib/CodeGen/CGOpenMPRuntime.h lib/CodeGen/CodeGenFunction.h Likely, something there has an active handle to your function.