Skip to content
Snippets Groups Projects
Commit 68aa908a authored by Benjamin Kramer's avatar Benjamin Kramer
Browse files

Turn some Twine locals into const char * variables.

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
parent 87e7bf9d
No related branches found
No related tags found
No related merge requests found
...@@ -223,7 +223,7 @@ static void DefineExactWidthIntType(TargetInfo::IntType Ty, ...@@ -223,7 +223,7 @@ static void DefineExactWidthIntType(TargetInfo::IntType Ty,
if (TypeWidth == 64) if (TypeWidth == 64)
Ty = IsSigned ? TI.getInt64Type() : TI.getIntTypeByWidth(64, false); 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); DefineType(Prefix + Twine(TypeWidth) + "_TYPE__", Ty, Builder);
...@@ -244,7 +244,7 @@ static void DefineExactWidthIntTypeSize(TargetInfo::IntType Ty, ...@@ -244,7 +244,7 @@ static void DefineExactWidthIntTypeSize(TargetInfo::IntType Ty,
if (TypeWidth == 64) if (TypeWidth == 64)
Ty = IsSigned ? TI.getInt64Type() : TI.getIntTypeByWidth(64, false); 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); DefineTypeSize(Prefix + Twine(TypeWidth) + "_MAX__", Ty, TI, Builder);
} }
...@@ -255,7 +255,7 @@ static void DefineLeastWidthIntType(unsigned TypeWidth, bool IsSigned, ...@@ -255,7 +255,7 @@ static void DefineLeastWidthIntType(unsigned TypeWidth, bool IsSigned,
if (Ty == TargetInfo::NoInt) if (Ty == TargetInfo::NoInt)
return; return;
Twine Prefix = IsSigned ? "__INT_LEAST" : "__UINT_LEAST"; const char *Prefix = IsSigned ? "__INT_LEAST" : "__UINT_LEAST";
DefineType(Prefix + Twine(TypeWidth) + "_TYPE__", Ty, Builder); DefineType(Prefix + Twine(TypeWidth) + "_TYPE__", Ty, Builder);
DefineTypeSize(Prefix + Twine(TypeWidth) + "_MAX__", Ty, TI, Builder); DefineTypeSize(Prefix + Twine(TypeWidth) + "_MAX__", Ty, TI, Builder);
} }
...@@ -268,7 +268,7 @@ static void DefineFastIntType(unsigned TypeWidth, bool IsSigned, ...@@ -268,7 +268,7 @@ static void DefineFastIntType(unsigned TypeWidth, bool IsSigned,
if (Ty == TargetInfo::NoInt) if (Ty == TargetInfo::NoInt)
return; return;
Twine Prefix = IsSigned ? "__INT_FAST" : "__UINT_FAST"; const char *Prefix = IsSigned ? "__INT_FAST" : "__UINT_FAST";
DefineType(Prefix + Twine(TypeWidth) + "_TYPE__", Ty, Builder); DefineType(Prefix + Twine(TypeWidth) + "_TYPE__", Ty, Builder);
DefineTypeSize(Prefix + Twine(TypeWidth) + "_MAX__", Ty, TI, Builder); DefineTypeSize(Prefix + Twine(TypeWidth) + "_MAX__", Ty, TI, Builder);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment