[PATCH] D44162: TargetMachine: Add address space to getPointerSize

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 6 09:53:20 PST 2018


arsenm created this revision.
Herald added a subscriber: wdng.

I'm not sure why these wrappers are here rather than just exposing the contained DataLayout


https://reviews.llvm.org/D44162

Files:
  include/llvm/Target/TargetMachine.h


Index: include/llvm/Target/TargetMachine.h
===================================================================
--- include/llvm/Target/TargetMachine.h
+++ include/llvm/Target/TargetMachine.h
@@ -138,7 +138,13 @@
   /// Get the pointer size for this target.
   ///
   /// This is the only time the DataLayout in the TargetMachine is used.
-  unsigned getPointerSize() const { return DL.getPointerSize(); }
+  unsigned getPointerSize(unsigned AS = 0) const {
+    return DL.getPointerSize(AS);
+  }
+
+  unsigned getPointerSizeInBits(unsigned AS = 0) const {
+    return DL.getPointerSizeInBits(AS);
+  }
 
   /// \brief Reset the target options based on the function's attributes.
   // FIXME: Remove TargetOptions that affect per-function code generation


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44162.137221.patch
Type: text/x-patch
Size: 755 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180306/e24f5d10/attachment.bin>


More information about the llvm-commits mailing list