Remove undefined declarations in src/gn headers

Delete 17 method and symbol declarations across 12 headers in src/gn/ that have no corresponding definitions anywhere in the codebase.

Change-Id: I09401b545fc561a0bfa30997951df4f0a1b1a2e9
Reviewed-on: https://gn-review.googlesource.com/c/gn/+/29101
Reviewed-by: Matt Stark <msta@google.com>
Commit-Queue: Takuto Ikuta <tikuta@google.com>
diff --git a/src/gn/functions.h b/src/gn/functions.h
index bf97b9e..313d46c 100644
--- a/src/gn/functions.h
+++ b/src/gn/functions.h
@@ -411,14 +411,6 @@
                        BlockNode* block,
                        Err* err);
 
-extern const char kReplaceSubstr[];
-extern const char kReplaceSubstr_HelpShort[];
-extern const char kReplaceSubstr_Help[];
-Value RunReplaceSubstr(Scope* scope,
-                       const FunctionCallNode* function,
-                       const std::vector<Value>& args_list,
-                       Err* err);
-
 extern const char kTarget[];
 extern const char kTarget_HelpShort[];
 extern const char kTarget_Help[];
diff --git a/src/gn/generated_file_target_generator.h b/src/gn/generated_file_target_generator.h
index 443de8e..d2a7924 100644
--- a/src/gn/generated_file_target_generator.h
+++ b/src/gn/generated_file_target_generator.h
@@ -24,7 +24,6 @@
   void DoRun() override;
 
  private:
-  bool FillGeneratedFileOutput();
   bool FillOutputConversion();
   bool FillContents();
   bool FillCollectValidationsMetadata();
diff --git a/src/gn/item.h b/src/gn/item.h
index 4a6e193..ad4df93 100644
--- a/src/gn/item.h
+++ b/src/gn/item.h
@@ -73,8 +73,6 @@
   virtual bool OnResolved(Err* err);
 
  private:
-  bool CheckTestonly(Err* err) const;
-
   const Settings* settings_;
   Label label_;
   SourceFileSet build_dependency_files_;
diff --git a/src/gn/ninja_target_writer.h b/src/gn/ninja_target_writer.h
index 4f5c0d1..6927422 100644
--- a/src/gn/ninja_target_writer.h
+++ b/src/gn/ninja_target_writer.h
@@ -159,7 +159,6 @@
   mutable std::unique_ptr<ResolvedTargetData> resolved_owned_;
 
  private:
-  void WriteCopyRules();
   void WriteEscapedSubstitution(const Substitution* type);
 
   NinjaTargetWriter(const NinjaTargetWriter&) = delete;
diff --git a/src/gn/ninja_toolchain_writer.h b/src/gn/ninja_toolchain_writer.h
index 7bc3f05..ae1ca60 100644
--- a/src/gn/ninja_toolchain_writer.h
+++ b/src/gn/ninja_toolchain_writer.h
@@ -39,7 +39,6 @@
 
   void Run(const std::vector<NinjaWriter::TargetRulePair>& extra_rules);
 
-  void WriteRules();
   void WriteToolRule(Tool* tool, const std::string& rule_prefix);
   void WriteRulePattern(const char* name,
                         const SubstitutionPattern& pattern,
diff --git a/src/gn/rust_project_writer.h b/src/gn/rust_project_writer.h
index 819d1f7..8b4b105 100644
--- a/src/gn/rust_project_writer.h
+++ b/src/gn/rust_project_writer.h
@@ -29,10 +29,6 @@
   static void RenderJSON(const BuildSettings* build_settings,
                          std::vector<const Target*>& all_targets,
                          StringOutputBuffer& rust_project);
-
- private:
-  // This function visits the deps graph of a target in a DFS fashion.
-  static void VisitDeps(const Target* target, TargetSet* visited);
 };
 
 #endif  // TOOLS_GN_RUST_PROJECT_WRITER_H_
diff --git a/src/gn/rust_values_generator.h b/src/gn/rust_values_generator.h
index 19ddca5..b33a028 100644
--- a/src/gn/rust_values_generator.h
+++ b/src/gn/rust_values_generator.h
@@ -24,7 +24,6 @@
   bool FillCrateName();
   bool FillCrateRoot();
   bool FillCrateType();
-  bool FillEdition();
   bool FillAliasedDeps();
 
   Target* target_;
diff --git a/src/gn/scheduler.h b/src/gn/scheduler.h
index ffe15ce..4dbb657 100644
--- a/src/gn/scheduler.h
+++ b/src/gn/scheduler.h
@@ -115,8 +115,6 @@
   void LogOnMainThread(const std::string& verb, const std::string& msg);
   void FailWithErrorOnMainThread(const Err& err);
 
-  void DoTargetFileWrite(const Target* target);
-
   void OnComplete();
 
   // Waits for tasks scheduled via ScheduleWork() to complete their execution.
diff --git a/src/gn/target.h b/src/gn/target.h
index 908f3a6..6bbad3f 100644
--- a/src/gn/target.h
+++ b/src/gn/target.h
@@ -223,9 +223,6 @@
                    Err* err,
                    UniqueVector<const Target*>* deps_collected = nullptr) const;
 
-  // GeneratedFile-related methods.
-  bool GenerateFile(Err* err) const;
-
   // Metadata collection methods for GeneratedFile targets.
   struct GeneratedFile {
     Value output_conversion_;
@@ -547,9 +544,6 @@
   // Pulls necessary information from dependencies to this one when all
   // dependencies have been resolved.
   void PullDependentTargetConfigs();
-  void PullDependentTargetLibsFrom(const Target* dep, bool is_public);
-  void PullDependentTargetLibs();
-  void PullRecursiveHardDeps();
   void PullRecursiveBundleData();
 
   // Checks to see whether this target or any of its dependencies have real
diff --git a/src/gn/template.h b/src/gn/template.h
index 6386ba9..04521b7 100644
--- a/src/gn/template.h
+++ b/src/gn/template.h
@@ -49,7 +49,6 @@
  private:
   friend class base::RefCountedThreadSafe<Template>;
 
-  Template();
   ~Template();
 
   // It's important that this Scope is const. A template can be referenced by
diff --git a/src/gn/tool.h b/src/gn/tool.h
index d082541..e83725f 100644
--- a/src/gn/tool.h
+++ b/src/gn/tool.h
@@ -273,7 +273,6 @@
   bool ValidateSubstitutionList(const std::vector<const Substitution*>& list,
                                 const Value* origin,
                                 Err* err) const;
-  bool ValidateOutputs(Err* err) const;
   bool ReadBool(Scope* scope, const char* var, bool* field, Err* err);
   bool ReadString(Scope* scope, const char* var, std::string* field, Err* err);
   bool ReadPattern(Scope* scope,
diff --git a/src/gn/value.h b/src/gn/value.h
index e1903c9..2aae8ed 100644
--- a/src/gn/value.h
+++ b/src/gn/value.h
@@ -132,8 +132,6 @@
   bool operator!=(const Value& other) const;
 
  private:
-  void Deallocate();
-
   Type type_ = NONE;
   const ParseNode* origin_ = nullptr;