Tidy up example of getting the pointer size.
authorEric Christopher <echristo@gmail.com>
Fri, 14 Oct 2016 05:45:46 +0000 (05:45 +0000)
committerEric Christopher <echristo@gmail.com>
Fri, 14 Oct 2016 05:45:46 +0000 (05:45 +0000)
llvm-svn: 284201

llvm/docs/GarbageCollection.rst

index 81605bc..4ef1744 100644 (file)
@@ -1007,7 +1007,7 @@ a realistic example:
 
   void MyGCPrinter::finishAssembly(AsmPrinter &AP) {
     MCStreamer &OS = AP.OutStreamer;
-    unsigned IntPtrSize = AP.TM.getSubtargetImpl()->getDataLayout()->getPointerSize();
+    unsigned IntPtrSize = AP.getPointerSize();
 
     // Put this in the data section.
     OS.SwitchSection(AP.getObjFileLowering().getDataSection());