Parcourir la source

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
Benjamin Kramer il y a 11 ans
Parent
commit
68aa908ac5
1 fichiers modifiés avec 4 ajouts et 4 suppressions
  1. 4 4
      lib/Frontend/InitPreprocessor.cpp

+ 4 - 4
lib/Frontend/InitPreprocessor.cpp

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