diff options
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/Collector.cpp | 6 | ||||
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 5 | ||||
-rw-r--r-- | lib/CodeGen/ShadowStackCollector.cpp | 3 |
3 files changed, 6 insertions, 8 deletions
diff --git a/lib/CodeGen/Collector.cpp b/lib/CodeGen/Collector.cpp index fe5119ea2d..07869a0ff5 100644 --- a/lib/CodeGen/Collector.cpp +++ b/lib/CodeGen/Collector.cpp @@ -178,8 +178,8 @@ bool LowerIntrinsics::InsertRootInitializers(Function &F, AllocaInst **Roots, SmallPtrSet<AllocaInst*,16> InitedRoots; for (; !CouldBecomeSafePoint(IP); ++IP) if (StoreInst *SI = dyn_cast<StoreInst>(IP)) - if (AllocaInst *AI = dyn_cast<AllocaInst>( - IntrinsicInst::StripPointerCasts(SI->getOperand(1)))) + if (AllocaInst *AI = + dyn_cast<AllocaInst>(StripPointerCasts(SI->getOperand(1)))) InitedRoots.insert(AI); // Add root initializers. @@ -294,7 +294,7 @@ bool LowerIntrinsics::PerformDefaultLowering(Function &F, Collector &Coll) { // Initialize the GC root, but do not delete the intrinsic. The // backend needs the intrinsic to flag the stack slot. Roots.push_back(cast<AllocaInst>( - IntrinsicInst::StripPointerCasts(CI->getOperand(1)))); + StripPointerCasts(CI->getOperand(1)))); } break; default: diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 8c606b886b..ea047e683f 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -2712,7 +2712,7 @@ void SelectionDAGLowering::visitTargetIntrinsic(CallInst &I, /// ExtractTypeInfo - Returns the type info, possibly bitcast, encoded in V. static GlobalVariable *ExtractTypeInfo (Value *V) { - V = IntrinsicInst::StripPointerCasts(V); + V = StripPointerCasts(V); GlobalVariable *GV = dyn_cast<GlobalVariable>(V); assert ((GV || isa<ConstantPointerNull>(V)) && "TypeInfo must be a global variable or NULL"); @@ -3150,8 +3150,7 @@ SelectionDAGLowering::visitIntrinsicCall(CallInst &I, unsigned Intrinsic) { return 0; case Intrinsic::init_trampoline: { - const Function *F = - cast<Function>(IntrinsicInst::StripPointerCasts(I.getOperand(2))); + const Function *F = cast<Function>(StripPointerCasts(I.getOperand(2))); SDOperand Ops[6]; Ops[0] = getRoot(); diff --git a/lib/CodeGen/ShadowStackCollector.cpp b/lib/CodeGen/ShadowStackCollector.cpp index d41e83c712..121dfc2407 100644 --- a/lib/CodeGen/ShadowStackCollector.cpp +++ b/lib/CodeGen/ShadowStackCollector.cpp @@ -325,8 +325,7 @@ void ShadowStackCollector::CollectRoots(Function &F) { if (Function *F = CI->getCalledFunction()) if (F->getIntrinsicID() == Intrinsic::gcroot) { std::pair<CallInst*,AllocaInst*> Pair = std::make_pair( - CI, cast<AllocaInst>( - IntrinsicInst::StripPointerCasts(CI->getOperand(1)))); + CI, cast<AllocaInst>(StripPointerCasts(CI->getOperand(1)))); if (IsNullValue(CI->getOperand(2))) Roots.push_back(Pair); else |