Skip to content

Commit

Permalink
Turn some Twine locals into const char * variables.
Browse files Browse the repository at this point in the history
No functionality change, just stylistic cleanup. Change made by clang-tidy
and clang-format.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212544 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
d0k committed Jul 8, 2014
1 parent 87e7bf9 commit 68aa908
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/Frontend/InitPreprocessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ static void DefineExactWidthIntType(TargetInfo::IntType Ty,
if (TypeWidth == 64)
Ty = IsSigned ? TI.getInt64Type() : TI.getIntTypeByWidth(64, false);

Twine Prefix = IsSigned ? "__INT" : "__UINT";
const char *Prefix = IsSigned ? "__INT" : "__UINT";

DefineType(Prefix + Twine(TypeWidth) + "_TYPE__", Ty, Builder);

Expand All @@ -244,7 +244,7 @@ static void DefineExactWidthIntTypeSize(TargetInfo::IntType Ty,
if (TypeWidth == 64)
Ty = IsSigned ? TI.getInt64Type() : TI.getIntTypeByWidth(64, false);

Twine Prefix = IsSigned ? "__INT" : "__UINT";
const char *Prefix = IsSigned ? "__INT" : "__UINT";
DefineTypeSize(Prefix + Twine(TypeWidth) + "_MAX__", Ty, TI, Builder);
}

Expand All @@ -255,7 +255,7 @@ static void DefineLeastWidthIntType(unsigned TypeWidth, bool IsSigned,
if (Ty == TargetInfo::NoInt)
return;

Twine Prefix = IsSigned ? "__INT_LEAST" : "__UINT_LEAST";
const char *Prefix = IsSigned ? "__INT_LEAST" : "__UINT_LEAST";
DefineType(Prefix + Twine(TypeWidth) + "_TYPE__", Ty, Builder);
DefineTypeSize(Prefix + Twine(TypeWidth) + "_MAX__", Ty, TI, Builder);
}
Expand All @@ -268,7 +268,7 @@ static void DefineFastIntType(unsigned TypeWidth, bool IsSigned,
if (Ty == TargetInfo::NoInt)
return;

Twine Prefix = IsSigned ? "__INT_FAST" : "__UINT_FAST";
const char *Prefix = IsSigned ? "__INT_FAST" : "__UINT_FAST";
DefineType(Prefix + Twine(TypeWidth) + "_TYPE__", Ty, Builder);
DefineTypeSize(Prefix + Twine(TypeWidth) + "_MAX__", Ty, TI, Builder);
}
Expand Down

0 comments on commit 68aa908

Please sign in to comment.