diff options
author | Chris Lattner <sabre@nondot.org> | 2011-07-21 06:21:31 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-07-21 06:21:31 +0000 |
commit | c30a38f34bdfecb99ce49e3ffa479039c9bf0209 (patch) | |
tree | b67b287ea26fb1e9ec63d50cfc1ad665ab506414 /lib/VMCore/Module.cpp | |
parent | dbd4fe2b0ada8014c2c8e042651de5799a1d4c5d (diff) |
move tier out of an anonymous namespace, it doesn't make sense
to for it to be an an anon namespace and be in a header.
Eliminate some extraenous uses of tie.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135669 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Module.cpp')
-rw-r--r-- | lib/VMCore/Module.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/VMCore/Module.cpp b/lib/VMCore/Module.cpp index 25d5391b9e..ee63d696d5 100644 --- a/lib/VMCore/Module.cpp +++ b/lib/VMCore/Module.cpp @@ -82,8 +82,10 @@ Module::Endianness Module::getEndianness() const { Module::Endianness ret = AnyEndianness; while (!temp.empty()) { - StringRef token = DataLayout; - tie(token, temp) = getToken(temp, "-"); + std::pair<StringRef, StringRef> P = getToken(temp, "-"); + + StringRef token = P.first; + temp = P.second; if (token[0] == 'e') { ret = LittleEndian; @@ -95,15 +97,16 @@ Module::Endianness Module::getEndianness() const { return ret; } -/// Target Pointer Size information... +/// Target Pointer Size information. Module::PointerSize Module::getPointerSize() const { StringRef temp = DataLayout; Module::PointerSize ret = AnyPointerSize; while (!temp.empty()) { - StringRef token, signalToken; - tie(token, temp) = getToken(temp, "-"); - tie(signalToken, token) = getToken(token, ":"); + std::pair<StringRef, StringRef> TmpP = getToken(temp, "-"); + temp = TmpP.second; + TmpP = getToken(TmpP.first, ":"); + StringRef token = TmpP.second, signalToken = TmpP.first; if (signalToken[0] == 'p') { int size = 0; |