[clang] [clang][CodeGen] Remove now-unused FileManager variable (PR #91495)
Jacob Lambert via cfe-commits
cfe-commits at lists.llvm.org
Wed May 8 09:25:02 PDT 2024
https://github.com/lamb-j updated https://github.com/llvm/llvm-project/pull/91495
>From 4c687db250dabbc13557df46433a3c1cb3dff01e Mon Sep 17 00:00:00 2001
From: Jacob Lambert <jacob.lambert at amd.com>
Date: Wed, 8 May 2024 08:52:14 -0700
Subject: [PATCH 1/2] [clang][CodeGen] Remove now-unused FileManager variable
Fixes "error: private field 'FileMgr' is not used"
---
clang/lib/CodeGen/BackendConsumer.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/clang/lib/CodeGen/BackendConsumer.h b/clang/lib/CodeGen/BackendConsumer.h
index f9edbe901bb85..7dce21e743f72 100644
--- a/clang/lib/CodeGen/BackendConsumer.h
+++ b/clang/lib/CodeGen/BackendConsumer.h
@@ -34,7 +34,6 @@ class BackendConsumer : public ASTConsumer {
const CodeGenOptions &CodeGenOpts;
const TargetOptions &TargetOpts;
const LangOptions &LangOpts;
- const FileManager &FileMgr;
std::unique_ptr<raw_pwrite_stream> AsmOutStream;
ASTContext *Context;
IntrusiveRefCntPtr<llvm::vfs::FileSystem> FS;
>From 8a0a1efea67a84221318343f93633218163d742c Mon Sep 17 00:00:00 2001
From: Jacob Lambert <jacob.lambert at amd.com>
Date: Wed, 8 May 2024 09:14:33 -0700
Subject: [PATCH 2/2] Remove FileManager arguments from constructor
---
clang/lib/CodeGen/CodeGenAction.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/clang/lib/CodeGen/CodeGenAction.cpp b/clang/lib/CodeGen/CodeGenAction.cpp
index 0255f05b1f90e..fd3ece1695f71 100644
--- a/clang/lib/CodeGen/CodeGenAction.cpp
+++ b/clang/lib/CodeGen/CodeGenAction.cpp
@@ -120,7 +120,7 @@ BackendConsumer::BackendConsumer(
CoverageSourceInfo *CoverageInfo)
: Diags(Diags), Action(Action), HeaderSearchOpts(HeaderSearchOpts),
CodeGenOpts(CodeGenOpts), TargetOpts(TargetOpts), LangOpts(LangOpts),
- FileMgr(FileMgr), AsmOutStream(std::move(OS)), Context(nullptr), FS(VFS),
+ AsmOutStream(std::move(OS)), Context(nullptr), FS(VFS),
LLVMIRGeneration("irgen", "LLVM IR Generation Time"),
LLVMIRGenerationRefCount(0),
Gen(CreateLLVMCodeGen(Diags, InFile, std::move(VFS), HeaderSearchOpts,
@@ -145,7 +145,7 @@ BackendConsumer::BackendConsumer(
CoverageSourceInfo *CoverageInfo)
: Diags(Diags), Action(Action), HeaderSearchOpts(HeaderSearchOpts),
CodeGenOpts(CodeGenOpts), TargetOpts(TargetOpts), LangOpts(LangOpts),
- FileMgr(FileMgr), Context(nullptr), FS(VFS),
+ Context(nullptr), FS(VFS),
LLVMIRGeneration("irgen", "LLVM IR Generation Time"),
LLVMIRGenerationRefCount(0),
Gen(CreateLLVMCodeGen(Diags, "", std::move(VFS), HeaderSearchOpts, PPOpts,
More information about the cfe-commits
mailing list