]> granicus.if.org Git - clang/commitdiff
Basic: Add TargetInfo::getRegisterWidth hook.
authorDaniel Dunbar <daniel@zuster.org>
Tue, 21 Jun 2011 18:54:42 +0000 (18:54 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Tue, 21 Jun 2011 18:54:42 +0000 (18:54 +0000)
 - For clarity only, currently just assumes register width == long width.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133531 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/TargetInfo.h

index 05f472790b5be2ba9defcc7e6dd8fdc9b4df5717..f0c3d0a9bbe0f26350f527e790eb52fa1633e256 100644 (file)
@@ -240,6 +240,14 @@ public:
     return getTypeWidth(IntMaxType);
   }
 
+  /// getRegisterWidth - Return the "preferred" register width on this target.
+  uint64_t getRegisterWidth() const {
+    // Currently we assume the register width on the target matches the pointer
+    // width, we can introduce a new variable for this if/when some target wants
+    // it.
+    return LongWidth; 
+  }
+
   /// getUserLabelPrefix - This returns the default value of the
   /// __USER_LABEL_PREFIX__ macro, which is the prefix given to user symbols by
   /// default.  On most platforms this is "_", but it is "" on some, and "." on