Skip to content

Commit

Permalink
Fix [unused-private-field] error
Browse files Browse the repository at this point in the history
  • Loading branch information
dybv-sc committed Dec 18, 2024
1 parent 3030011 commit 8a5e9a9
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions llvm/tools/llvm-exegesis/lib/SnippetFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,9 @@ namespace {
// An MCStreamer that reads a BenchmarkCode definition from a file.
class BenchmarkCodeStreamer : public MCStreamer, public AsmCommentConsumer {
public:
explicit BenchmarkCodeStreamer(const ExegesisTarget &Target,
MCContext *Context, const LLVMState &State,
explicit BenchmarkCodeStreamer(MCContext *Context, const LLVMState &State,
BenchmarkCode *Result)
: MCStreamer(*Context), Target(Target), State(State), Result(Result) {}
: MCStreamer(*Context), State(State), Result(Result) {}
// Implementation of the MCStreamer interface. We only care about
// instructions.
void emitInstruction(const MCInst &Instruction,
Expand Down Expand Up @@ -218,7 +217,6 @@ class BenchmarkCodeStreamer : public MCStreamer, public AsmCommentConsumer {
return *RegisterNumber;
}

const ExegesisTarget &Target;
const LLVMState &State;
BenchmarkCode *const Result;
unsigned InvalidComments = 0;
Expand Down Expand Up @@ -252,8 +250,7 @@ Expected<std::vector<BenchmarkCode>> readSnippets(const LLVMState &State,
TM.getTarget().createMCObjectFileInfo(Context, /*PIC=*/false));
Context.setObjectFileInfo(ObjectFileInfo.get());
Context.initInlineSourceManager();
BenchmarkCodeStreamer Streamer(State.getExegesisTarget(), &Context, State,
&Result);
BenchmarkCodeStreamer Streamer(&Context, State, &Result);

std::string Error;
raw_string_ostream ErrorStream(Error);
Expand Down

0 comments on commit 8a5e9a9

Please sign in to comment.