summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-03-11 16:14:25 +0000
committerChris Lattner <sabre@nondot.org>2009-03-11 16:14:25 +0000
commit93e87652f225dc4a36cbc8f24968c4582f8fe86c (patch)
treed6124356d23504dea31324536159978b31342554
parentaa82be2b5b8215a6df5f058556791df2a3f55570 (diff)
downloadbcm5719-llvm-93e87652f225dc4a36cbc8f24968c4582f8fe86c.tar.gz
bcm5719-llvm-93e87652f225dc4a36cbc8f24968c4582f8fe86c.zip
fix PR3785, a valgrind error on test/CodeGen/ARM/pr3502.ll
llvm-svn: 66660
-rw-r--r--llvm/lib/Target/ARM/ARMTargetAsmInfo.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/Target/ARM/ARMTargetAsmInfo.cpp b/llvm/lib/Target/ARM/ARMTargetAsmInfo.cpp
index d2965fe80f0..4107dccd2a6 100644
--- a/llvm/lib/Target/ARM/ARMTargetAsmInfo.cpp
+++ b/llvm/lib/Target/ARM/ARMTargetAsmInfo.cpp
@@ -185,8 +185,12 @@ unsigned ARMTargetAsmInfo<BaseTAI>::getInlineAsmLength(const char *s) const {
Str++;
break;
}
+
+ if (*Str == 0) break;
+
// Ignore everything from comment char(s) to EOL
- if (strncmp(Str, BaseTAI::CommentString, strlen(BaseTAI::CommentString))==-0)
+ if (strncmp(Str, BaseTAI::CommentString,
+ strlen(BaseTAI::CommentString)) == 0)
atInsnStart = false;
// FIXME do something like the following for non-Darwin
else if (*Str == '.' && Subtarget->isTargetDarwin()) {
OpenPOWER on IntegriCloud