From: Daniel Dunbar Date: Tue, 21 Jun 2011 18:54:42 +0000 (+0000) Subject: Basic: Add TargetInfo::getRegisterWidth hook. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=08737c49bd98f73b50fe90fd19f97c41cd29e3d1;p=clang Basic: Add TargetInfo::getRegisterWidth hook. - 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 --- diff --git a/include/clang/Basic/TargetInfo.h b/include/clang/Basic/TargetInfo.h index 05f472790b..f0c3d0a9bb 100644 --- a/include/clang/Basic/TargetInfo.h +++ b/include/clang/Basic/TargetInfo.h @@ -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