[cfe-commits] r92917 - /cfe/trunk/lib/Frontend/InitPreprocessor.cpp

Kovarththanan Rajaratnam kovarththanan.rajaratnam at gmail.com
Thu Jan 7 08:01:54 PST 2010


Author: krj
Date: Thu Jan  7 10:01:54 2010
New Revision: 92917

URL: http://llvm.org/viewvc/llvm-project?rev=92917&view=rev
Log:
Tigthen scope of local char array

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=92917&r1=92916&r2=92917&view=diff

==============================================================================
--- cfe/trunk/lib/Frontend/InitPreprocessor.cpp (original)
+++ cfe/trunk/lib/Frontend/InitPreprocessor.cpp Thu Jan  7 10:01:54 2010
@@ -266,7 +266,6 @@
 static void InitializePredefinedMacros(const TargetInfo &TI,
                                        const LangOptions &LangOpts,
                                        std::vector<char> &Buf) {
-  char MacroBuf[60];
   // Compiler version introspection macros.
   DefineBuiltinMacro(Buf, "__llvm__=1");   // LLVM Backend
   DefineBuiltinMacro(Buf, "__clang__=1");  // Clang Frontend
@@ -415,6 +414,7 @@
   DefineFloatMacros(Buf, "LDBL", &TI.getLongDoubleFormat());
 
   // Define a __POINTER_WIDTH__ macro for stdint.h.
+  char MacroBuf[60];
   sprintf(MacroBuf, "__POINTER_WIDTH__=%d", (int)TI.getPointerWidth(0));
   DefineBuiltinMacro(Buf, MacroBuf);
 





More information about the cfe-commits mailing list