Add a const lookup routine to get a BlockAddress constant if there is
[oota-llvm.git] / lib / MC / MCAtom.cpp
index 17a74687e1a12739a46089b138a60d40557a9f85..bc353cdcf65d4bf239c866b749a43e7566a18867 100644 (file)
@@ -14,6 +14,9 @@
 
 using namespace llvm;
 
+// Pin the vtable to this file.
+void MCAtom::anchor() {}
+
 void MCAtom::remap(uint64_t NewBegin, uint64_t NewEnd) {
   Parent->remap(this, NewBegin, NewEnd);
 }
@@ -44,7 +47,7 @@ void MCAtom::remapForSplit(uint64_t SplitPt,
 
 void MCDataAtom::addData(const MCData &D) {
   Data.push_back(D);
-  if (Data.size() > Begin - End)
+  if (Data.size() > End + 1 - Begin)
     remap(Begin, End + 1);
 }