summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2012-02-21 06:54:41 +0000
committerCraig Topper <craig.topper@gmail.com>2012-02-21 06:54:41 +0000
commitf3e3783012dc7875ed37be8aaaefd96f98454781 (patch)
treee6461aa85028cdcd860c0ffd88daf5bc29f41dde /include
parent902af25abdc9e6d25b898310c1e4716bbe768fb9 (diff)
downloadllvm-f3e3783012dc7875ed37be8aaaefd96f98454781.tar.gz
llvm-f3e3783012dc7875ed37be8aaaefd96f98454781.tar.bz2
llvm-f3e3783012dc7875ed37be8aaaefd96f98454781.tar.xz
In generated RegisterInfo files, replace a pointer to the end of an array with just the size of the array to avoid relocations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151041 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/MC/MCRegisterInfo.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/llvm/MC/MCRegisterInfo.h b/include/llvm/MC/MCRegisterInfo.h
index 2bf754ed9a..c4c6ccf9b2 100644
--- a/include/llvm/MC/MCRegisterInfo.h
+++ b/include/llvm/MC/MCRegisterInfo.h
@@ -33,7 +33,8 @@ public:
const unsigned RegSize, Alignment; // Size & Alignment of register in bytes
const int CopyCost;
const bool Allocatable;
- const iterator RegsBegin, RegsEnd;
+ const iterator RegsBegin;
+ unsigned RegsSize;
const unsigned char *const RegSet;
const unsigned RegSetSize;
@@ -48,11 +49,11 @@ public:
/// begin/end - Return all of the registers in this class.
///
iterator begin() const { return RegsBegin; }
- iterator end() const { return RegsEnd; }
+ iterator end() const { return RegsBegin + RegsSize; }
/// getNumRegs - Return the number of registers in this class.
///
- unsigned getNumRegs() const { return (unsigned)(RegsEnd-RegsBegin); }
+ unsigned getNumRegs() const { return RegsSize; }
/// getRegister - Return the specified register in the class.
///