diff options
| author | Zhongxing Xu <xuzhongxing@gmail.com> | 2010-08-21 12:24:38 +0000 |
|---|---|---|
| committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2010-08-21 12:24:38 +0000 |
| commit | faf150bbc3bdb0f31ab1ad20b2247ee8a1b4cf35 (patch) | |
| tree | 2388811bda7abe54afb332adb7750dd41fd92c36 /clang/lib | |
| parent | 7a1a8e25ea8ef02a9131dc5c71def4fea64ab0ec (diff) | |
| download | bcm5719-llvm-faf150bbc3bdb0f31ab1ad20b2247ee8a1b4cf35.tar.gz bcm5719-llvm-faf150bbc3bdb0f31ab1ad20b2247ee8a1b4cf35.zip | |
Place method near its class.
llvm-svn: 111737
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Checker/RegionStore.cpp | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/clang/lib/Checker/RegionStore.cpp b/clang/lib/Checker/RegionStore.cpp index c51a4c8c1d6..0dca4b2b781 100644 --- a/clang/lib/Checker/RegionStore.cpp +++ b/clang/lib/Checker/RegionStore.cpp @@ -78,6 +78,19 @@ public: }; } // end anonymous namespace +BindingKey BindingKey::Make(const MemRegion *R, Kind k) { + if (const ElementRegion *ER = dyn_cast<ElementRegion>(R)) { + const RegionRawOffset &O = ER->getAsArrayOffset(); + + // FIXME: There are some ElementRegions for which we cannot compute + // raw offsets yet, including regions with symbolic offsets. These will be + // ignored by the store. + return BindingKey(O.getRegion(), O.getByteOffset(), k); + } + + return BindingKey(R, 0, k); +} + namespace llvm { static inline llvm::raw_ostream& operator<<(llvm::raw_ostream& os, BindingKey K) { @@ -1528,18 +1541,6 @@ Store RegionStoreManager::CopyLazyBindings(nonloc::LazyCompoundVal V, // "Raw" retrievals and bindings. //===----------------------------------------------------------------------===// -BindingKey BindingKey::Make(const MemRegion *R, Kind k) { - if (const ElementRegion *ER = dyn_cast<ElementRegion>(R)) { - const RegionRawOffset &O = ER->getAsArrayOffset(); - - // FIXME: There are some ElementRegions for which we cannot compute - // raw offsets yet, including regions with symbolic offsets. These will be - // ignored by the store. - return BindingKey(O.getRegion(), O.getByteOffset(), k); - } - - return BindingKey(R, 0, k); -} RegionBindings RegionStoreManager::Add(RegionBindings B, BindingKey K, SVal V) { if (!K.isValid()) |

