Test commit access - add a blank line in comment.
[oota-llvm.git] / lib / CodeGen / StatepointExampleGC.cpp
index ed6d0e927f05c754df173e7c1d1c7622fcb3a6e2..3f60e18fafa92857768d54191cf34affd57b3444 100644 (file)
@@ -16,7 +16,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "llvm/IR/GCStrategy.h"
+#include "llvm/CodeGen/GCStrategy.h"
 #include "llvm/IR/DerivedTypes.h"
 #include "llvm/IR/Value.h"
 
@@ -34,12 +34,14 @@ 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.
+    // 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());
   }
 };