[PATCH] D153176: [Frontend] Remove ShowIncludesPretendHeader

Shoaib Meenai via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 21 15:50:23 PDT 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rG1df10f15807f: [Frontend] Remove ShowIncludesPretendHeader (authored by smeenai).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D153176/new/

https://reviews.llvm.org/D153176

Files:
  clang/include/clang/Frontend/DependencyOutputOptions.h
  clang/lib/Frontend/HeaderIncludeGen.cpp


Index: clang/lib/Frontend/HeaderIncludeGen.cpp
===================================================================
--- clang/lib/Frontend/HeaderIncludeGen.cpp
+++ clang/lib/Frontend/HeaderIncludeGen.cpp
@@ -214,13 +214,8 @@
 
     // We track when we are done with the predefines by watching for the first
     // place where we drop back to a nesting depth of 1.
-    if (CurrentIncludeDepth == 1 && !HasProcessedPredefines) {
-      if (!DepOpts.ShowIncludesPretendHeader.empty()) {
-        PrintHeaderInfo(OutputFile, DepOpts.ShowIncludesPretendHeader,
-                        ShowDepth, 2, MSStyle);
-      }
+    if (CurrentIncludeDepth == 1 && !HasProcessedPredefines)
       HasProcessedPredefines = true;
-    }
 
     return;
   } else {
@@ -233,8 +228,6 @@
   unsigned IncludeDepth = CurrentIncludeDepth;
   if (!HasProcessedPredefines)
     --IncludeDepth; // Ignore indent from <built-in>.
-  else if (!DepOpts.ShowIncludesPretendHeader.empty())
-    ++IncludeDepth; // Pretend inclusion by ShowIncludesPretendHeader.
 
   // FIXME: Identify headers in a more robust way than comparing their name to
   // "<command line>" and "<built-in>" in a bunch of places.
Index: clang/include/clang/Frontend/DependencyOutputOptions.h
===================================================================
--- clang/include/clang/Frontend/DependencyOutputOptions.h
+++ clang/include/clang/Frontend/DependencyOutputOptions.h
@@ -76,9 +76,6 @@
   /// target.
   std::vector<std::pair<std::string, ExtraDepKind>> ExtraDeps;
 
-  /// In /showIncludes mode, pretend the main TU is a header with this name.
-  std::string ShowIncludesPretendHeader;
-
   /// The file to write GraphViz-formatted header dependencies to.
   std::string DOTOutputFile;
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D153176.533424.patch
Type: text/x-patch
Size: 1745 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230621/87c5609c/attachment.bin>


More information about the cfe-commits mailing list