diff options
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/CodeGen/CoreCLRGC.cpp | 4 | ||||
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp | 6 | ||||
| -rw-r--r-- | llvm/lib/CodeGen/StatepointExampleGC.cpp | 4 | ||||
| -rw-r--r-- | llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/CoreCLRGC.cpp b/llvm/lib/CodeGen/CoreCLRGC.cpp index 28c97ba71bd..ff7c0d5dc0a 100644 --- a/llvm/lib/CodeGen/CoreCLRGC.cpp +++ b/llvm/lib/CodeGen/CoreCLRGC.cpp @@ -38,9 +38,9 @@ public: UsesMetadata = false; CustomRoots = false; } - Optional<bool> isGCManagedPointer(const Value *V) const override { + Optional<bool> isGCManagedPointer(const Type *Ty) const override { // Method is only valid on pointer typed values. - PointerType *PT = cast<PointerType>(V->getType()); + const PointerType *PT = cast<PointerType>(Ty); // We pick addrspace(1) as our GC managed heap. return (1 == PT->getAddressSpace()); } diff --git a/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp index a74d15371ca..87373154c87 100644 --- a/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp @@ -509,21 +509,21 @@ static void lowerStatepointMetaArgs(SmallVectorImpl<SDValue> &Ops, // to the GCStrategy from there (yet). GCStrategy &S = Builder.GFI->getStrategy(); for (const Value *V : Bases) { - auto Opt = S.isGCManagedPointer(V); + auto Opt = S.isGCManagedPointer(V->getType()); if (Opt.hasValue()) { assert(Opt.getValue() && "non gc managed base pointer found in statepoint"); } } for (const Value *V : Ptrs) { - auto Opt = S.isGCManagedPointer(V); + auto Opt = S.isGCManagedPointer(V->getType()); if (Opt.hasValue()) { assert(Opt.getValue() && "non gc managed derived pointer found in statepoint"); } } for (const Value *V : Relocations) { - auto Opt = S.isGCManagedPointer(V); + auto Opt = S.isGCManagedPointer(V->getType()); if (Opt.hasValue()) { assert(Opt.getValue() && "non gc managed pointer relocated"); } diff --git a/llvm/lib/CodeGen/StatepointExampleGC.cpp b/llvm/lib/CodeGen/StatepointExampleGC.cpp index 95dfd75018c..3f60e18fafa 100644 --- a/llvm/lib/CodeGen/StatepointExampleGC.cpp +++ b/llvm/lib/CodeGen/StatepointExampleGC.cpp @@ -34,9 +34,9 @@ public: UsesMetadata = false; CustomRoots = false; } - Optional<bool> isGCManagedPointer(const Value *V) const override { + Optional<bool> isGCManagedPointer(const Type *Ty) const override { // Method is only valid on pointer typed values. - PointerType *PT = cast<PointerType>(V->getType()); + const PointerType *PT = cast<PointerType>(Ty); // For the sake of this example GC, we arbitrarily pick addrspace(1) as our // GC managed heap. We know that a pointer into this heap needs to be // updated and that no other pointer does. Note that addrspace(1) is used diff --git a/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp b/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp index 062fba5cdad..0a61d4b5da0 100644 --- a/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp +++ b/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp @@ -215,7 +215,7 @@ static void findLiveSetAtInst(Instruction *inst, GCPtrLivenessData &Data, StatepointLiveSetTy &out); // TODO: Once we can get to the GCStrategy, this becomes -// Optional<bool> isGCManagedPointer(const Value *V) const override { +// Optional<bool> isGCManagedPointer(const Type *Ty) const override { static bool isGCPointerType(Type *T) { if (auto *PT = dyn_cast<PointerType>(T)) |

