diff options
author | Ken Dyck <ken.dyck@onsemi.com> | 2010-01-26 17:01:47 +0000 |
---|---|---|
committer | Ken Dyck <ken.dyck@onsemi.com> | 2010-01-26 17:01:47 +0000 |
commit | 86a8c957dac585dd59f6c5ece4f911f5ad4921d4 (patch) | |
tree | c1b59c0a4d73f913bc40775693f7ffe6e729fece | |
parent | fdb744b203d555cbff6e7c8eb44863c2b8901d65 (diff) | |
download | bcm5719-llvm-86a8c957dac585dd59f6c5ece4f911f5ad4921d4.tar.gz bcm5719-llvm-86a8c957dac585dd59f6c5ece4f911f5ad4921d4.zip |
Replace inheritance of RegionRawOffset from std::pair with two private member
variables to improve readability and encapsulation.
llvm-svn: 94550
-rw-r--r-- | clang/include/clang/Checker/PathSensitive/MemRegion.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/clang/include/clang/Checker/PathSensitive/MemRegion.h b/clang/include/clang/Checker/PathSensitive/MemRegion.h index e1b21b16e2d..12bc0b79568 100644 --- a/clang/include/clang/Checker/PathSensitive/MemRegion.h +++ b/clang/include/clang/Checker/PathSensitive/MemRegion.h @@ -249,17 +249,20 @@ public: class ElementRegion; -class RegionRawOffset : public std::pair<const MemRegion*, int64_t> { +class RegionRawOffset { private: friend class ElementRegion; + const MemRegion *Region; + int64_t Offset; + RegionRawOffset(const MemRegion* reg, int64_t offset = 0) - : std::pair<const MemRegion*, int64_t>(reg, offset) {} + : Region(reg), Offset(offset) {} public: // FIXME: Eventually support symbolic offsets. - int64_t getByteOffset() const { return second; } - const MemRegion *getRegion() const { return first; } + int64_t getByteOffset() const { return Offset; } + const MemRegion *getRegion() const { return Region; } void dumpToStream(llvm::raw_ostream& os) const; void dump() const; |