[PATCH] D15599: [CodeGen] Fix a crash that occurs when attribute "naked" is attached to a c++ member function
Manman Ren via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 20 12:34:36 PST 2016
manmanren added a subscriber: manmanren.
manmanren added a comment.
Thanks for working on this! A few comments inline.
Manman
================
Comment at: lib/CodeGen/CodeGenFunction.cpp:1962
@@ +1961,3 @@
+ for (auto *U : I->users())
+ InstrsToRemove.push_back(cast<llvm::Instruction>(U));
+
----------------
Do we need to check if the user has been erased? I am not sure if the same instruction can be pushed multiple times into InstrsToRemove.
================
Comment at: lib/CodeGen/CodeGenFunction.cpp:1979
@@ +1978,3 @@
+ if (auto *T = EntryBB->getTerminator())
+ T->eraseFromParent();
+
----------------
Is it possible that T has been erased in the above?
http://reviews.llvm.org/D15599
More information about the cfe-commits
mailing list