[llvm] r284201 - Tidy up example of getting the pointer size.

Eric Christopher via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 13 22:45:46 PDT 2016


Author: echristo
Date: Fri Oct 14 00:45:46 2016
New Revision: 284201

URL: http://llvm.org/viewvc/llvm-project?rev=284201&view=rev
Log:
Tidy up example of getting the pointer size.

Modified:
    llvm/trunk/docs/GarbageCollection.rst

Modified: llvm/trunk/docs/GarbageCollection.rst
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/GarbageCollection.rst?rev=284201&r1=284200&r2=284201&view=diff
==============================================================================
--- llvm/trunk/docs/GarbageCollection.rst (original)
+++ llvm/trunk/docs/GarbageCollection.rst Fri Oct 14 00:45:46 2016
@@ -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());




More information about the llvm-commits mailing list