diff options
author | Vitaly Buka <vitalybuka@google.com> | 2024-06-12 13:14:26 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-12 13:14:26 -0700 |
commit | 682d461d5a231cee54d65910e6341769419a67d7 (patch) | |
tree | 1441fb2956b5f3c2f355d442c4de0508f5259a35 /clang/lib/Frontend/DependencyFile.cpp | |
parent | 294f3ce5dde916c358d8f672b4a1c706c0387154 (diff) | |
download | llvm-682d461d5a231cee54d65910e6341769419a67d7.zip llvm-682d461d5a231cee54d65910e6341769419a67d7.tar.gz llvm-682d461d5a231cee54d65910e6341769419a67d7.tar.bz2 |
Revert "✨ [Sema, Lex, Parse] Preprocessor embed in C and C++ (and Obj-C and Obj-C++ by-proxy)" (#95299)
Reverts llvm/llvm-project#68620
Introduce or expose a memory leak and UB, see llvm/llvm-project#68620
Diffstat (limited to 'clang/lib/Frontend/DependencyFile.cpp')
-rw-r--r-- | clang/lib/Frontend/DependencyFile.cpp | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/clang/lib/Frontend/DependencyFile.cpp b/clang/lib/Frontend/DependencyFile.cpp index 528eae2..369816e 100644 --- a/clang/lib/Frontend/DependencyFile.cpp +++ b/clang/lib/Frontend/DependencyFile.cpp @@ -62,19 +62,6 @@ struct DepCollectorPPCallbacks : public PPCallbacks { /*IsMissing=*/false); } - void EmbedDirective(SourceLocation, StringRef, bool, - OptionalFileEntryRef File, - const LexEmbedParametersResult &) override { - assert(File && "expected to only be called when the file is found"); - StringRef FileName = - llvm::sys::path::remove_leading_dotslash(File->getName()); - DepCollector.maybeAddDependency(FileName, - /*FromModule*/ false, - /*IsSystem*/ false, - /*IsModuleFile*/ false, - /*IsMissing*/ false); - } - void InclusionDirective(SourceLocation HashLoc, const Token &IncludeTok, StringRef FileName, bool IsAngled, CharSourceRange FilenameRange, @@ -90,18 +77,6 @@ struct DepCollectorPPCallbacks : public PPCallbacks { // Files that actually exist are handled by FileChanged. } - void HasEmbed(SourceLocation, StringRef, bool, - OptionalFileEntryRef File) override { - if (!File) - return; - StringRef Filename = - llvm::sys::path::remove_leading_dotslash(File->getName()); - DepCollector.maybeAddDependency(Filename, - /*FromModule=*/false, false, - /*IsModuleFile=*/false, - /*IsMissing=*/false); - } - void HasInclude(SourceLocation Loc, StringRef SpelledFilename, bool IsAngled, OptionalFileEntryRef File, SrcMgr::CharacteristicKind FileType) override { |