summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-12-05 02:36:00 +0000
committerTed Kremenek <kremenek@apple.com>2008-12-05 02:36:00 +0000
commite2c86c30d0eff2883d8a7df6a5b9b31453e88fe8 (patch)
treeb1896dbb6232ad8fedddbab7165b03ff782f3a16
parentd8242f19f7cea21f9bb9923bb2537fc5e202d0d5 (diff)
downloadbcm5719-llvm-e2c86c30d0eff2883d8a7df6a5b9b31453e88fe8.tar.gz
bcm5719-llvm-e2c86c30d0eff2883d8a7df6a5b9b31453e88fe8.zip
Remove (unused) RegionExtent and subclasses. Extents are now represented easily using SVals.
llvm-svn: 60576
-rw-r--r--clang/include/clang/Analysis/PathSensitive/MemRegion.h79
1 files changed, 0 insertions, 79 deletions
diff --git a/clang/include/clang/Analysis/PathSensitive/MemRegion.h b/clang/include/clang/Analysis/PathSensitive/MemRegion.h
index 22e3bda05fb..575b7f75061 100644
--- a/clang/include/clang/Analysis/PathSensitive/MemRegion.h
+++ b/clang/include/clang/Analysis/PathSensitive/MemRegion.h
@@ -439,85 +439,6 @@ public:
}
};
-/// RegionExtent - Represents the size, or extent, of an abstract memory chunk
-/// (a region). Sizes are in bits. RegionExtent is essentially a variant with
-/// three subclasses: UnknownExtent, FixedExtent, and SymbolicExtent.
-
-class RegionExtent {
-public:
- enum Kind { Unknown = 0, Fixed = 0, Sym = 1 };
-
-protected:
- const uintptr_t Raw;
- RegionExtent(uintptr_t raw, Kind k) : Raw(raw | k) {}
- uintptr_t getData() const { return Raw & ~0x1; }
-
-public:
- // Folding-set profiling.
- void Profile(llvm::FoldingSetNodeID& ID) const {
- ID.AddPointer((void*) Raw);
- }
- // Comparing extents.
- bool operator==(const RegionExtent& R) const {
- return Raw == R.Raw;
- }
- bool operator!=(const RegionExtent& R) const {
- return Raw != R.Raw;
- }
- // Implement isa<T> support.
- Kind getKind() const { return Kind(Raw & 0x1); }
- uintptr_t getRaw() const { return Raw; }
-
- static inline bool classof(const RegionExtent*) {
- return true;
- }
-};
-
-/// UnknownExtent - Represents a region extent with no available information
-/// about the size of the region.
-class UnknownExtent : public RegionExtent {
-public:
- UnknownExtent() : RegionExtent(0,Unknown) {}
-
- // Implement isa<T> support.
- static inline bool classof(const RegionExtent* E) {
- return E->getRaw() == 0;
- }
-};
-
-/// FixedExtent - Represents a region extent with a known fixed size.
-/// Typically FixedExtents are used to represent the size of variables, but
-/// they can also be used to represent the size of a constant-sized array.
-class FixedExtent : public RegionExtent {
-public:
- FixedExtent(const llvm::APSInt& X) : RegionExtent((uintptr_t) &X, Fixed) {}
-
- const llvm::APSInt& getInt() const {
- return *((llvm::APSInt*) getData());
- }
-
- // Implement isa<T> support.
- static inline bool classof(const RegionExtent* E) {
- return E->getKind() == Fixed && E->getRaw() != 0;
- }
-};
-
-/// SymbolicExtent - Represents the extent of a region where the extent
-/// itself is a symbolic value. These extents can be used to represent
-/// the sizes of dynamically allocated chunks of memory with variable size.
-class SymbolicExtent : public RegionExtent {
-public:
- SymbolicExtent(SymbolRef S) : RegionExtent(S.getNumber() << 1, Sym) {}
-
- SymbolRef getSymbol() const { return SymbolRef(getData() >> 1); }
-
- // Implement isa<T> support.
- static inline bool classof(const RegionExtent* E) {
- return E->getKind() == Sym;
- }
-};
-
-
//===----------------------------------------------------------------------===//
// MemRegionManager - Factory object for creating regions.
//===----------------------------------------------------------------------===//
OpenPOWER on IntegriCloud