]> granicus.if.org Git - clang/commitdiff
Place method near its class.
authorZhongxing Xu <xuzhongxing@gmail.com>
Sat, 21 Aug 2010 12:24:38 +0000 (12:24 +0000)
committerZhongxing Xu <xuzhongxing@gmail.com>
Sat, 21 Aug 2010 12:24:38 +0000 (12:24 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111737 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Checker/RegionStore.cpp

index c51a4c8c1d63c8762600016778381f0e92a764ab..0dca4b2b781a7402ada08ecb754961a2f7d73e4b 100644 (file)
@@ -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())