diff options
Diffstat (limited to 'clang/lib/Frontend/InitPreprocessor.cpp')
-rw-r--r-- | clang/lib/Frontend/InitPreprocessor.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Frontend/InitPreprocessor.cpp b/clang/lib/Frontend/InitPreprocessor.cpp index 456d624f738..88f28f3e8e4 100644 --- a/clang/lib/Frontend/InitPreprocessor.cpp +++ b/clang/lib/Frontend/InitPreprocessor.cpp @@ -63,11 +63,11 @@ static void DefineBuiltinMacro(std::vector<char> &Buf, llvm::StringRef Macro, // 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'); } |