Make StringRef::getAsInteger work with all integer types. Before this change
authorMichael J. Spencer <bigcheesegs@gmail.com>
Sat, 10 Mar 2012 23:02:54 +0000 (23:02 +0000)
committerMichael J. Spencer <bigcheesegs@gmail.com>
Sat, 10 Mar 2012 23:02:54 +0000 (23:02 +0000)
commit9130b42a85998238b7bbe25ed2989e0605f636f0
treed1ad5334a4a32208d55ce2ca66c6f804179e71b5
parent4210b34e5988ce53458a88ee6dfb0c9bcdad3d57
Make StringRef::getAsInteger work with all integer types. Before this change
it would fail with {,u}int64_t on x86-64 Linux.

This also removes code duplication.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152517 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ADT/StringRef.h
lib/Support/StringRef.cpp
unittests/ADT/StringRefTest.cpp