diff options
author | Daniel Dunbar <daniel@zuster.org> | 2011-06-21 18:54:42 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2011-06-21 18:54:42 +0000 |
commit | 08737c49bd98f73b50fe90fd19f97c41cd29e3d1 (patch) | |
tree | 8f8de004f57143e5122c5a49fdddeff34346c869 | |
parent | 08d4792bb5d9e0e7f122c6273636807029c06aaa (diff) |
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
-rw-r--r-- | include/clang/Basic/TargetInfo.h | 8 |
1 files changed, 8 insertions, 0 deletions
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 |