@@ -41,8 +41,7 @@ bool llvm::InlineFunction(InvokeInst *II, CallGraph *CG, const TargetData *TD) {
41
41
// / block of the inlined code (the last block is the end of the function),
42
42
// / and InlineCodeInfo is information about the code that got inlined.
43
43
static void HandleInlinedInvoke (InvokeInst *II, BasicBlock *FirstNewBlock,
44
- ClonedCodeInfo &InlinedCodeInfo,
45
- CallGraph *CG) {
44
+ ClonedCodeInfo &InlinedCodeInfo) {
46
45
BasicBlock *InvokeDest = II->getUnwindDest ();
47
46
std::vector<Value*> InvokeDestPHIValues;
48
47
@@ -94,10 +93,6 @@ static void HandleInlinedInvoke(InvokeInst *II, BasicBlock *FirstNewBlock,
94
93
// Make sure that anything using the call now uses the invoke!
95
94
CI->replaceAllUsesWith (II);
96
95
97
- // Update the callgraph.
98
- if (CG)
99
- (*CG)[Caller]->replaceCallSite (CI, II);
100
-
101
96
// Delete the unconditional branch inserted by splitBasicBlock
102
97
BB->getInstList ().pop_back ();
103
98
Split->getInstList ().pop_front (); // Delete the original call
@@ -438,7 +433,7 @@ bool llvm::InlineFunction(CallSite CS, CallGraph *CG, const TargetData *TD) {
438
433
// any inlined 'unwind' instructions into branches to the invoke exception
439
434
// destination, and call instructions into invoke instructions.
440
435
if (InvokeInst *II = dyn_cast<InvokeInst>(TheCall))
441
- HandleInlinedInvoke (II, FirstNewBlock, InlinedFunctionInfo, CG );
436
+ HandleInlinedInvoke (II, FirstNewBlock, InlinedFunctionInfo);
442
437
443
438
// If we cloned in _exactly one_ basic block, and if that block ends in a
444
439
// return instruction, we splice the body of the inlined callee directly into
0 commit comments