diff options
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 91195343..5d7794e 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -235,7 +235,8 @@ void CodeGenModule::applyReplacements() { OldF->replaceAllUsesWith(Replacement); if (NewF) { NewF->removeFromParent(); - OldF->getParent()->getFunctionList().insertAfter(OldF, NewF); + OldF->getParent()->getFunctionList().insertAfter(OldF->getIterator(), + NewF); } OldF->eraseFromParent(); } |