From 682d461d5a231cee54d65910e6341769419a67d7 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Wed, 12 Jun 2024 13:14:26 -0700 Subject: =?UTF-8?q?Revert=20"=E2=9C=A8=20[Sema,=20Lex,=20Parse]=20Preproce?= =?UTF-8?q?ssor=20embed=20in=20C=20and=20C++=20(and=20Obj-C=20and=20Obj-C+?= =?UTF-8?q?+=20by-proxy)"=20(#95299)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reverts llvm/llvm-project#68620 Introduce or expose a memory leak and UB, see llvm/llvm-project#68620 --- clang/lib/Frontend/CompilerInvocation.cpp | 8 -------- 1 file changed, 8 deletions(-) (limited to 'clang/lib/Frontend/CompilerInvocation.cpp') diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index cde4a84..58694e5 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -4492,9 +4492,6 @@ static void GeneratePreprocessorArgs(const PreprocessorOptions &Opts, if (Opts.DefineTargetOSMacros) GenerateArg(Consumer, OPT_fdefine_target_os_macros); - for (const auto &EmbedEntry : Opts.EmbedEntries) - GenerateArg(Consumer, OPT_embed_dir_EQ, EmbedEntry); - // Don't handle LexEditorPlaceholders. It is implied by the action that is // generated elsewhere. } @@ -4587,11 +4584,6 @@ static bool ParsePreprocessorArgs(PreprocessorOptions &Opts, ArgList &Args, } } - for (const auto *A : Args.filtered(OPT_embed_dir_EQ)) { - StringRef Val = A->getValue(); - Opts.EmbedEntries.push_back(std::string(Val)); - } - // Always avoid lexing editor placeholders when we're just running the // preprocessor as we never want to emit the // "editor placeholder in source file" error in PP only mode. -- cgit v1.1