Skip to content

Commit

Permalink
Fix bug in method LLLexer::FP80HexToIntPair
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246489 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
KarlSchimpf committed Aug 31, 2015
1 parent e05235a commit 460da41
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/AsmParser/LLLexer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ void LLLexer::FP80HexToIntPair(const char *Buffer, const char *End,
Pair[1] += hexDigitValue(*Buffer);
}
Pair[0] = 0;
for (int i=0; i<16; i++, Buffer++) {
for (int i = 0; i < 16 && Buffer != End; i++, Buffer++) {
Pair[0] *= 16;
Pair[0] += hexDigitValue(*Buffer);
}
Expand Down
6 changes: 6 additions & 0 deletions test/Assembler/invalid-fp80hex.ll
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
; RUN: not llvm-as < %s 2>&1 | FileCheck %s

; Tests bug: 24640
; CHECK: expected '=' in global variable

@- 0xKate potb8ed

0 comments on commit 460da41

Please sign in to comment.