[llvm] r246489 - Fix bug in method LLLexer::FP80HexToIntPair
Karl Schimpf via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 31 14:36:15 PDT 2015
Author: kschimpf
Date: Mon Aug 31 16:36:14 2015
New Revision: 246489
URL: http://llvm.org/viewvc/llvm-project?rev=246489&view=rev
Log:
Fix bug in method LLLexer::FP80HexToIntPair
Added:
llvm/trunk/test/Assembler/invalid-fp80hex.ll
Modified:
llvm/trunk/lib/AsmParser/LLLexer.cpp
Modified: llvm/trunk/lib/AsmParser/LLLexer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/LLLexer.cpp?rev=246489&r1=246488&r2=246489&view=diff
==============================================================================
--- llvm/trunk/lib/AsmParser/LLLexer.cpp (original)
+++ llvm/trunk/lib/AsmParser/LLLexer.cpp Mon Aug 31 16:36:14 2015
@@ -105,7 +105,7 @@ void LLLexer::FP80HexToIntPair(const cha
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);
}
Added: llvm/trunk/test/Assembler/invalid-fp80hex.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/invalid-fp80hex.ll?rev=246489&view=auto
==============================================================================
--- llvm/trunk/test/Assembler/invalid-fp80hex.ll (added)
+++ llvm/trunk/test/Assembler/invalid-fp80hex.ll Mon Aug 31 16:36:14 2015
@@ -0,0 +1,6 @@
+; RUN: not llvm-as < %s 2>&1 | FileCheck %s
+
+; Tests bug: 24640
+; CHECK: expected '=' in global variable
+
+ at - 0xKate potb8ed
More information about the llvm-commits
mailing list