<div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>+/// ARM-specific version of TargetAsmInfo::getInlineAsmLength.<br>+unsigned ARMTargetAsmInfo::getInlineAsmLength(const char *Str) const {
<br>+ // Count the number of bytes in the asm.<br>+ bool atInsnStart = true;<br>+ unsigned Length = 0;<br>+ for (; *Str; ++Str) {<br>+ if (atInsnStart) {<br>+ // Skip whitespace<br>+ while (*Str && isspace(*Str) && *Str != '\n')
<br>+ Str++;<br>+ // Skip label<br>+ for (const char* p = Str; *p && !isspace(*p); p++)<br>+ if (*p == ':') {<br>+ Str = p+1;<br>+ break;<br>+ }<br>+ // Ignore everything from comment char(s) to EOL
<br>+ if (strncmp(Str, CommentString, strlen(CommentString))==-0)<br>+ atInsnStart = false;<br>+ else {<br>+ // An instruction<br>+ atInsnStart = false;<br>+ if (isThumb) {<br>+ // BL and BLX <non-reg> are 4 bytes, all others 2.
<br>+ const char*p = Str;</blockquote><div><br>"p" is an unused variable.<br>/home/laurov/llvm/llvm/lib/Target/ARM/ARMTargetAsmInfo.cpp: In member function 'virtual unsigned int llvm::ARMTargetAsmInfo::getInlineAsmLength(const char*) const':
<br>/home/laurov/llvm/llvm/lib/Target/ARM/ARMTargetAsmInfo.cpp:115: warning: unused variable 'p'<br><br> </div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
+ if ((*Str=='b' || *Str=='B') &&<br>+ (*(Str+1)=='l' || *(Str+1)=='L')) {<br>+ if (*(Str+2)=='x' || *(Str+2)=='X') {<br>+ const char* p = Str+3;
<br>+ while (*p && isspace(*p))<br>+ p++;<br>+ if (*p == 'r' || *p=='R')<br>+ Length += 2; // BLX reg<br>+ else<br>+ Length += 4; // BLX non-reg
<br>+ }<br>+ else<br>+ Length += 4; // BL<br>+ } else<br>+ Length += 2; // Thumb anything else<br>+ }<br>+ else<br>+ Length += 4; // ARM
<br>+ }<br>+ }<br>+ if (*Str == '\n' || *Str == SeparatorChar)<br>+ atInsnStart = true;<br>+ }<br>+ return Length;<br>+}<br><br><br><br>_______________________________________________<br>llvm-commits mailing list
<br><a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br></blockquote></div>
<br>