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

Kovarththanan Rajaratnam kovarththanan.rajaratnam at gmail.com
Sat Jan 9 01:31:32 PST 2010


Author: krj
Date: Sat Jan  9 03:31:32 2010
New Revision: 93049

URL: http://llvm.org/viewvc/llvm-project?rev=93049&view=rev
Log:
Switch UndefineBuiltinMacro() over to using StringRef

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=93049&r1=93048&r2=93049&view=diff

==============================================================================
--- cfe/trunk/lib/Frontend/InitPreprocessor.cpp (original)
+++ cfe/trunk/lib/Frontend/InitPreprocessor.cpp Sat Jan  9 03:31:32 2010
@@ -63,11 +63,11 @@
 
 // Append a #undef line to Buf for Macro.  Macro should be of the form XXX
 // and we emit "#undef XXX".
-static void UndefineBuiltinMacro(std::vector<char> &Buf, const char *Macro) {
+static void UndefineBuiltinMacro(std::vector<char> &Buf, llvm::StringRef Macro) {
   // Push "macroname".
   const char Command[] = "#undef ";
   Buf.insert(Buf.end(), Command, Command+strlen(Command));
-  Buf.insert(Buf.end(), Macro, Macro+strlen(Macro));
+  Buf.insert(Buf.end(), Macro.begin(), Macro.end());
   Buf.push_back('\n');
 }
 





More information about the cfe-commits mailing list