diff --git a/tools/lto/LTOModule.cpp b/tools/lto/LTOModule.cpp index ac38d244c40..cef69226371 100644 --- a/tools/lto/LTOModule.cpp +++ b/tools/lto/LTOModule.cpp @@ -329,7 +329,7 @@ void LTOModule::lazyParseSymbols() if (pend == std::string::npos) break; - asmSymbolName.assign(inlineAsm, pbegin, pbegin-pend); + asmSymbolName.assign(inlineAsm, pbegin, pend - pbegin); addAsmGlobalSymbol(asmSymbolName.c_str()); // search next .globl