[cfe-commits] r111737 - /cfe/trunk/lib/Checker/RegionStore.cpp
Zhongxing Xu
xuzhongxing at gmail.com
Sat Aug 21 05:24:38 PDT 2010
Author: zhongxingxu
Date: Sat Aug 21 07:24:38 2010
New Revision: 111737
URL: http://llvm.org/viewvc/llvm-project?rev=111737&view=rev
Log:
Place method near its class.
Modified:
cfe/trunk/lib/Checker/RegionStore.cpp
Modified: cfe/trunk/lib/Checker/RegionStore.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/RegionStore.cpp?rev=111737&r1=111736&r2=111737&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/RegionStore.cpp (original)
+++ cfe/trunk/lib/Checker/RegionStore.cpp Sat Aug 21 07:24:38 2010
@@ -78,6 +78,19 @@
};
} // 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 @@
// "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())
More information about the cfe-commits
mailing list