summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
diff options
context:
space:
mode:
authorSanjoy Das <sanjoy@playingwithpointers.com>2016-06-26 04:55:19 +0000
committerSanjoy Das <sanjoy@playingwithpointers.com>2016-06-26 04:55:19 +0000
commit73c7f26035455b27e4bedb9eda519ef2f3e715ba (patch)
tree95eee19e1f396988aaae5ad990b04e58e14bccf6 /llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
parent1e7eeb4bf0bb727002870d63241eadb68e102e23 (diff)
downloadbcm5719-llvm-73c7f26035455b27e4bedb9eda519ef2f3e715ba.tar.gz
bcm5719-llvm-73c7f26035455b27e4bedb9eda519ef2f3e715ba.zip
[RSForGC] Bring containsGCPtrType, isGCPointerType up to code; NFC
llvm-svn: 273795
Diffstat (limited to 'llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp b/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
index 7a71b31181a..7995dab977e 100644
--- a/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
+++ b/llvm/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<ArrayType>(Ty))
return containsGCPtrType(AT->getElementType());
if (StructType *ST = dyn_cast<StructType>(Ty))
- return std::any_of(ST->subtypes().begin(), ST->subtypes().end(),
- containsGCPtrType);
+ return any_of(ST->subtypes(), containsGCPtrType);
return false;
}
OpenPOWER on IntegriCloud