Chromium Code Reviews| Index: src/IceGlobalInits.h |
| diff --git a/src/IceGlobalInits.h b/src/IceGlobalInits.h |
| index b4c629943abfc725fb2792a3390315aaf164a562..5c2e6b8a3836dbcf80544d02faad5f42d2428f89 100644 |
| --- a/src/IceGlobalInits.h |
| +++ b/src/IceGlobalInits.h |
| @@ -216,10 +216,6 @@ public: |
| SizeT Size; |
| }; |
| - // Relocation address offsets must be 32 bit values. |
| - typedef int32_t RelocOffsetType; |
| - static const SizeT RelocAddrSize = 4; |
| - |
| /// Defines the relocation value of another global declaration. |
| class RelocInitializer : public Initializer { |
| RelocInitializer(const RelocInitializer &) = delete; |
| @@ -227,13 +223,13 @@ public: |
| public: |
| RelocInitializer(const GlobalDeclaration *Declaration, |
| - RelocOffsetType Offset) |
| + RelocOffsetT Offset) |
| : Initializer(RelocInitializerKind), Declaration(Declaration), |
| Offset(Offset) {} |
| ~RelocInitializer() override {} |
| - RelocOffsetType getOffset() const { return Offset; } |
| + RelocOffsetT getOffset() const { return Offset; } |
| const GlobalDeclaration *getDeclaration() const { return Declaration; } |
| - SizeT getNumBytes() const final { return RelocAddrSize; } |
| + SizeT getNumBytes() const final { return sizeof(RelocOffsetT); } |
|
jvoung (off chromium)
2014/11/04 19:21:55
or I can keep the constant, and put it alongside R
Karl
2014/11/04 20:15:00
I would prefer the constant, in case we change the
Jim Stichnoth
2014/11/04 20:18:05
But RelocOffsetT (as well as RelocOffsetType) is d
Karl
2014/11/04 23:01:21
I have no problem with this, so long as a comment
|
| void dump(GlobalContext *Ctx, Ostream &Stream) const final; |
| void dumpType(Ostream &Stream) const final; |
| static bool classof(const Initializer *R) { |
| @@ -244,7 +240,7 @@ public: |
| // The global declaration used in the relocation. |
| const GlobalDeclaration *Declaration; |
| // The offset to add to the relocation. |
| - const RelocOffsetType Offset; |
| + const RelocOffsetT Offset; |
| }; |
| /// Models the list of initializers. |