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
This commit is contained in:
Chris Lattner
2011-07-21 06:21:31 +00:00
parent dbd4fe2b0a
commit c30a38f34b
7 changed files with 54 additions and 58 deletions

View File

@ -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;