aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-09-19 23:58:48 +0000
committerChris Lattner <sabre@nondot.org>2009-09-19 23:58:48 +0000
commit60b7363a854bd53c30e474836e3a1e04ac2dc163 (patch)
treec8155d0fa9d52866e8df1922ee0e0c96a35443b7 /include/llvm
parentd867fb4396c8affcdb680108b43cb110b7d12db8 (diff)
downloadexternal_llvm-60b7363a854bd53c30e474836e3a1e04ac2dc163.zip
external_llvm-60b7363a854bd53c30e474836e3a1e04ac2dc163.tar.gz
external_llvm-60b7363a854bd53c30e474836e3a1e04ac2dc163.tar.bz2
add some more overloads of StringRef::getAsInteger for
common and useful integer types. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82338 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r--include/llvm/ADT/StringRef.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/llvm/ADT/StringRef.h b/include/llvm/ADT/StringRef.h
index 2015a66..01f5d7b 100644
--- a/include/llvm/ADT/StringRef.h
+++ b/include/llvm/ADT/StringRef.h
@@ -235,8 +235,10 @@ namespace llvm {
/// this returns true to signify the error. The string is considered
/// erroneous if empty.
///
- //bool getAsInteger(unsigned Radix, long long &Result) const;
+ bool getAsInteger(unsigned Radix, long long &Result) const;
bool getAsInteger(unsigned Radix, unsigned long long &Result) const;
+ bool getAsInteger(unsigned Radix, int &Result) const;
+ bool getAsInteger(unsigned Radix, unsigned &Result) const;
// TODO: Provide overloads for int/unsigned that check for overflow.