[PATCH] Fix assertion failure on DeferredDeclsToEmit.
Logan Chien
tzuhsiang.chien at gmail.com
Sat Oct 11 12:44:55 PDT 2014
Hi rafael,
The assertion failure will be raised by TryEmitDefinitionAsAlias()
because it will call Entry->replaceAllUsesWith(Alias) and Entry
might be hold by the AssertingVH, which will become a dangling
pointer after RAUW.
This commit fixes the problem by replacing AssertingVH with
TrackingVH.
Note: This issue is partially fixed by r217874, since the usage of
GetAddrOfGlobal() is replaced by getAddrOfCXXStructor() with DontDefer=true.
http://reviews.llvm.org/D5743
Files:
lib/CodeGen/CodeGenModule.h
test/CodeGenCXX/ctor-dtor-alias-assertingvh.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5743.14773.patch
Type: text/x-patch
Size: 1549 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20141011/42a07c0b/attachment.bin>
More information about the cfe-commits
mailing list