From 18f06305e221b28e8b98be53b3422a496138676f Mon Sep 17 00:00:00 2001 From: Sanjoy Das Date: Sun, 26 Jun 2016 04:55:19 +0000 Subject: [PATCH] [RSForGC] Bring containsGCPtrType, isGCPointerType up to code; NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273795 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Scalar/RewriteStatepointsForGC.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp b/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp index 7a71b31181a..7995dab977e 100644 --- a/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp +++ b/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp @@ -219,7 +219,7 @@ static bool isGCPointerType(Type *T) { // 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. - return (1 == PT->getAddressSpace()); + return PT->getAddressSpace() == 1; return false; } @@ -250,8 +250,7 @@ static bool containsGCPtrType(Type *Ty) { if (ArrayType *AT = dyn_cast(Ty)) return containsGCPtrType(AT->getElementType()); if (StructType *ST = dyn_cast(Ty)) - return std::any_of(ST->subtypes().begin(), ST->subtypes().end(), - containsGCPtrType); + return any_of(ST->subtypes(), containsGCPtrType); return false; } -- 2.50.1