summaryrefslogtreecommitdiff
path: root/utils/TableGen/TGLexer.cpp
diff options
context:
space:
mode:
authorChuck Rose III <cfr@adobe.com>2007-11-21 19:36:25 +0000
committerChuck Rose III <cfr@adobe.com>2007-11-21 19:36:25 +0000
commit8b0ec6440083261418b400e024f15b66d4ce44db (patch)
treed0e1560a7d19a44ab845cd330bfc4a6db8cb6cbd /utils/TableGen/TGLexer.cpp
parentbaccd5872e87adb0431ae3ebfa83719b97880808 (diff)
downloadllvm-8b0ec6440083261418b400e024f15b66d4ce44db.tar.gz
llvm-8b0ec6440083261418b400e024f15b66d4ce44db.tar.bz2
llvm-8b0ec6440083261418b400e024f15b66d4ce44db.tar.xz
Switching back to strtoll. Including config.h. On VStudio builds, this overrides strtoll.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44264 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/TGLexer.cpp')
-rw-r--r--utils/TableGen/TGLexer.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/utils/TableGen/TGLexer.cpp b/utils/TableGen/TGLexer.cpp
index 562f0ee0f7..9efb4d4ffd 100644
--- a/utils/TableGen/TGLexer.cpp
+++ b/utils/TableGen/TGLexer.cpp
@@ -18,6 +18,7 @@
#include "llvm/Support/MemoryBuffer.h"
typedef std::pair<llvm::Record*, std::vector<llvm::Init*>*> SubClassRefTy;
#include "FileParser.h"
+#include "llvm/Config/config.h"
#include <cctype>
using namespace llvm;
@@ -341,7 +342,7 @@ int TGLexer::LexNumber() {
if (CurPtr == NumStart)
return ReturnError(CurPtr-2, "Invalid hexadecimal number");
- Filelval.IntVal = strtol(NumStart, 0, 16);
+ Filelval.IntVal = strtoll(NumStart, 0, 16);
return INTVAL;
} else if (CurPtr[0] == 'b') {
@@ -354,7 +355,7 @@ int TGLexer::LexNumber() {
if (CurPtr == NumStart)
return ReturnError(CurPtr-2, "Invalid binary number");
- Filelval.IntVal = strtol(NumStart, 0, 2);
+ Filelval.IntVal = strtoll(NumStart, 0, 2);
return INTVAL;
}
}
@@ -368,7 +369,7 @@ int TGLexer::LexNumber() {
while (isdigit(CurPtr[0]))
++CurPtr;
- Filelval.IntVal = strtol(NumStart, 0, 10);
+ Filelval.IntVal = strtoll(NumStart, 0, 10);
return INTVAL;
}