@@ -82,7 +82,9 @@ class InputFile {
82
82
virtual void parse () = 0;
83
83
84
84
// Returns the CPU type this file was compiled to.
85
- virtual MachineTypes getMachineType () { return IMAGE_FILE_MACHINE_UNKNOWN; }
85
+ virtual MachineTypes getMachineType () const {
86
+ return IMAGE_FILE_MACHINE_UNKNOWN;
87
+ }
86
88
87
89
MemoryBufferRef mb;
88
90
@@ -133,7 +135,7 @@ class ObjFile : public InputFile {
133
135
static bool classof (const InputFile *f) { return f->kind () == ObjectKind; }
134
136
void parse () override ;
135
137
void parseLazy ();
136
- MachineTypes getMachineType () override ;
138
+ MachineTypes getMachineType () const override ;
137
139
ArrayRef<Chunk *> getChunks () { return chunks; }
138
140
ArrayRef<SectionChunk *> getDebugChunks () { return debugChunks; }
139
141
ArrayRef<SectionChunk *> getSXDataChunks () { return sxDataChunks; }
@@ -376,7 +378,7 @@ class BitcodeFile : public InputFile {
376
378
~BitcodeFile ();
377
379
static bool classof (const InputFile *f) { return f->kind () == BitcodeKind; }
378
380
ArrayRef<Symbol *> getSymbols () { return symbols; }
379
- MachineTypes getMachineType () override ;
381
+ MachineTypes getMachineType () const override ;
380
382
void parseLazy ();
381
383
std::unique_ptr<llvm::lto::InputFile> obj;
382
384
@@ -393,7 +395,7 @@ class DLLFile : public InputFile {
393
395
: InputFile(ctx, DLLKind, m) {}
394
396
static bool classof (const InputFile *f) { return f->kind () == DLLKind; }
395
397
void parse () override ;
396
- MachineTypes getMachineType () override ;
398
+ MachineTypes getMachineType () const override ;
397
399
398
400
struct Symbol {
399
401
StringRef dllName;
0 commit comments