Changes to make the Stacker Stack use 64 bit values. This *should* get
around the problem with Stacker on Solaris because the Stack can handle
64-bit entries (pointer sized).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13441 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/projects/Stacker/lib/compiler/Lexer.l b/projects/Stacker/lib/compiler/Lexer.l
index 65f1a97..e45cdee 100644
--- a/projects/Stacker/lib/compiler/Lexer.l
+++ b/projects/Stacker/lib/compiler/Lexer.l
@@ -31,10 +31,10 @@
#include "StackerParser.h"
/* Conversion of text ints to binary */
-static uint64_t IntToVal(const char *Buffer) {
- uint64_t Result = 0;
+static int64_t IntToVal(const char *Buffer) {
+ int64_t Result = 0;
for (; *Buffer; Buffer++) {
- uint64_t OldRes = Result;
+ int64_t OldRes = Result;
Result *= 10;
Result += *Buffer-'0';
if (Result < OldRes) // Uh, oh, overflow detected!!!
@@ -44,10 +44,10 @@
}
/* Conversion of text hexadecimal ints to binary */
-static uint64_t HexIntToVal(const char *Buffer) {
- uint64_t Result = 0;
+static int64_t HexIntToVal(const char *Buffer) {
+ int64_t Result = 0;
for (; *Buffer; ++Buffer) {
- uint64_t OldRes = Result;
+ int64_t OldRes = Result;
Result *= 16;
char C = *Buffer;
if (C >= '0' && C <= '9')