r212544 - Turn some Twine locals into const char * variables.

Benjamin Kramer benny.kra at googlemail.com
Tue Jul 8 09:07:37 PDT 2014


Author: d0k
Date: Tue Jul  8 11:07:36 2014
New Revision: 212544

URL: http://llvm.org/viewvc/llvm-project?rev=212544&view=rev
Log:
Turn some Twine locals into const char * variables.

No functionality change, just stylistic cleanup. Change made by clang-tidy
and clang-format.

Modified:
    cfe/trunk/lib/Frontend/InitPreprocessor.cpp

Modified: cfe/trunk/lib/Frontend/InitPreprocessor.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/InitPreprocessor.cpp?rev=212544&r1=212543&r2=212544&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/InitPreprocessor.cpp (original)
+++ cfe/trunk/lib/Frontend/InitPreprocessor.cpp Tue Jul  8 11:07:36 2014
@@ -223,7 +223,7 @@ static void DefineExactWidthIntType(Targ
   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(
   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(unsi
   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 T
   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);
 }





More information about the cfe-commits mailing list