summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/lib/CodeGen/StatepointExampleGC.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2015-05-27 20:26:41 +0000
committerdim <dim@FreeBSD.org>2015-05-27 20:26:41 +0000
commit5ef8fd3549d38e883a31881636be3dc2a275de20 (patch)
treebd13a22d9db57ccf3eddbc07b32c18109521d050 /contrib/llvm/lib/CodeGen/StatepointExampleGC.cpp
parent77794ebe2d5718eb502c93ec32f8ccae4d8a0b7b (diff)
parent782067d0278612ee75d024b9b135c221c327e9e8 (diff)
downloadFreeBSD-src-5ef8fd3549d38e883a31881636be3dc2a275de20.zip
FreeBSD-src-5ef8fd3549d38e883a31881636be3dc2a275de20.tar.gz
Merge llvm trunk r238337 from ^/vendor/llvm/dist, resolve conflicts, and
preserve our customizations, where necessary.
Diffstat (limited to 'contrib/llvm/lib/CodeGen/StatepointExampleGC.cpp')
-rw-r--r--contrib/llvm/lib/CodeGen/StatepointExampleGC.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/contrib/llvm/lib/CodeGen/StatepointExampleGC.cpp b/contrib/llvm/lib/CodeGen/StatepointExampleGC.cpp
index 802cf13..95dfd75 100644
--- a/contrib/llvm/lib/CodeGen/StatepointExampleGC.cpp
+++ b/contrib/llvm/lib/CodeGen/StatepointExampleGC.cpp
@@ -12,7 +12,7 @@
// suitable as a default implementation usable with any collector which can
// consume the standard stackmap format generated by statepoints, uses the
// default addrespace to distinguish between gc managed and non-gc managed
-// pointers, and has reasonable relocation semantics.
+// pointers, and has reasonable relocation semantics.
//
//===----------------------------------------------------------------------===//
@@ -33,21 +33,22 @@ public:
NeededSafePoints = 0;
UsesMetadata = false;
CustomRoots = false;
- CustomSafePoints = false;
}
Optional<bool> isGCManagedPointer(const Value *V) const override {
// Method is only valid on pointer typed values.
PointerType *PT = cast<PointerType>(V->getType());
// 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.
+ // updated and that no other pointer does. Note that addrspace(1) is used
+ // only as an example, it has no special meaning, and is not reserved for
+ // GC usage.
return (1 == PT->getAddressSpace());
}
};
}
-static GCRegistry::Add<StatepointGC>
-X("statepoint-example", "an example strategy for statepoint");
+static GCRegistry::Add<StatepointGC> X("statepoint-example",
+ "an example strategy for statepoint");
namespace llvm {
void linkStatepointExampleGC() {}
OpenPOWER on IntegriCloud