aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorJoerg Sonnenberger <joerg@bec.de>2012-08-10 10:57:52 +0000
committerJoerg Sonnenberger <joerg@bec.de>2012-08-10 10:57:52 +0000
commit8ce9cca118b32604f481ad381eafab25b5798c9f (patch)
tree2b441c984d1e38bd05405cc8c8ba2c91173f3163 /lib/CodeGen
parentd1a4f68a4301d1ee3098cc9db0cd507b96dd1bee (diff)
Decrementing std::string::end is not portable, use array access instead.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161659 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/CodeGenModule.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp
index a66641510a..3ae3c52130 100644
--- a/lib/CodeGen/CodeGenModule.cpp
+++ b/lib/CodeGen/CodeGenModule.cpp
@@ -2636,7 +2636,7 @@ void CodeGenModule::EmitTopLevelDecl(Decl *D) {
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());