r282242 - Minor tweak. Avoid hardcoding.
Daniel Marjamaki via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 23 05:23:44 PDT 2016
Author: danielmarjamaki
Date: Fri Sep 23 07:23:44 2016
New Revision: 282242
URL: http://llvm.org/viewvc/llvm-project?rev=282242&view=rev
Log:
Minor tweak. Avoid hardcoding.
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=282242&r1=282241&r2=282242&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/InitPreprocessor.cpp (original)
+++ cfe/trunk/lib/Frontend/InitPreprocessor.cpp Fri Sep 23 07:23:44 2016
@@ -673,7 +673,7 @@ static void InitializePredefinedMacros(c
// Define type sizing macros based on the target properties.
assert(TI.getCharWidth() == 8 && "Only support 8-bit char so far");
- Builder.defineMacro("__CHAR_BIT__", "8");
+ Builder.defineMacro("__CHAR_BIT__", Twine(TI.getCharWidth()));
DefineTypeSize("__SCHAR_MAX__", TargetInfo::SignedChar, TI, Builder);
DefineTypeSize("__SHRT_MAX__", TargetInfo::SignedShort, TI, Builder);
More information about the cfe-commits
mailing list