diff options
| -rw-r--r-- | llvm/lib/MC/MCAtom.cpp | 4 | 
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/MC/MCAtom.cpp b/llvm/lib/MC/MCAtom.cpp index 2626b39db4c..f3ea6c344d8 100644 --- a/llvm/lib/MC/MCAtom.cpp +++ b/llvm/lib/MC/MCAtom.cpp @@ -72,8 +72,8 @@ MCDataAtom *MCDataAtom::split(uint64_t SplitPt) {  // MCTextAtom  void MCTextAtom::addInst(const MCInst &I, uint64_t Size) { -  if (NextInstAddress > End) -    remap(Begin, NextInstAddress); +  if (NextInstAddress + Size - 1 > End) +    remap(Begin, NextInstAddress + Size - 1);    Insts.push_back(MCDecodedInst(I, NextInstAddress, Size));    NextInstAddress += Size;  }  | 

