Skip to content

Commit 1dc0a79

Browse files
committed
Fix [unused-private-field] error
1 parent 3030011 commit 1dc0a79

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

llvm/tools/llvm-exegesis/lib/SnippetFile.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ namespace {
3737
// An MCStreamer that reads a BenchmarkCode definition from a file.
3838
class BenchmarkCodeStreamer : public MCStreamer, public AsmCommentConsumer {
3939
public:
40-
explicit BenchmarkCodeStreamer(const ExegesisTarget &Target,
41-
MCContext *Context, const LLVMState &State,
40+
explicit BenchmarkCodeStreamer(MCContext *Context, const LLVMState &State,
4241
BenchmarkCode *Result)
43-
: MCStreamer(*Context), Target(Target), State(State), Result(Result) {}
42+
: MCStreamer(*Context), State(State), Result(Result) {}
43+
4444
// Implementation of the MCStreamer interface. We only care about
4545
// instructions.
4646
void emitInstruction(const MCInst &Instruction,
@@ -218,7 +218,6 @@ class BenchmarkCodeStreamer : public MCStreamer, public AsmCommentConsumer {
218218
return *RegisterNumber;
219219
}
220220

221-
const ExegesisTarget &Target;
222221
const LLVMState &State;
223222
BenchmarkCode *const Result;
224223
unsigned InvalidComments = 0;
@@ -252,8 +251,7 @@ Expected<std::vector<BenchmarkCode>> readSnippets(const LLVMState &State,
252251
TM.getTarget().createMCObjectFileInfo(Context, /*PIC=*/false));
253252
Context.setObjectFileInfo(ObjectFileInfo.get());
254253
Context.initInlineSourceManager();
255-
BenchmarkCodeStreamer Streamer(State.getExegesisTarget(), &Context, State,
256-
&Result);
254+
BenchmarkCodeStreamer Streamer(&Context, State, &Result);
257255

258256
std::string Error;
259257
raw_string_ostream ErrorStream(Error);

0 commit comments

Comments
 (0)