[cfe-commits] r161659 - /cfe/trunk/lib/CodeGen/CodeGenModule.cpp
Joerg Sonnenberger
joerg at bec.de
Fri Aug 10 03:57:53 PDT 2012
Author: joerg
Date: Fri Aug 10 05:57:52 2012
New Revision: 161659
URL: http://llvm.org/viewvc/llvm-project?rev=161659&view=rev
Log:
Decrementing std::string::end is not portable, use array access instead.
Modified:
cfe/trunk/lib/CodeGen/CodeGenModule.cpp
Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=161659&r1=161658&r2=161659&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Fri Aug 10 05:57:52 2012
@@ -2636,7 +2636,7 @@
const std::string &S = getModule().getModuleInlineAsm();
if (S.empty())
getModule().setModuleInlineAsm(AsmString);
- else if (*--S.end() == '\n')
+ else if (S.end()[-1] == '\n')
getModule().setModuleInlineAsm(S + AsmString.str());
else
getModule().setModuleInlineAsm(S + '\n' + AsmString.str());
More information about the cfe-commits
mailing list