@@ -82,7 +82,9 @@ class InputFile {
8282 virtual void parse () = 0;
8383
8484 // 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+ }
8688
8789 MemoryBufferRef mb;
8890
@@ -133,7 +135,7 @@ class ObjFile : public InputFile {
133135 static bool classof (const InputFile *f) { return f->kind () == ObjectKind; }
134136 void parse () override ;
135137 void parseLazy ();
136- MachineTypes getMachineType () override ;
138+ MachineTypes getMachineType () const override ;
137139 ArrayRef<Chunk *> getChunks () { return chunks; }
138140 ArrayRef<SectionChunk *> getDebugChunks () { return debugChunks; }
139141 ArrayRef<SectionChunk *> getSXDataChunks () { return sxDataChunks; }
@@ -376,7 +378,7 @@ class BitcodeFile : public InputFile {
376378 ~BitcodeFile ();
377379 static bool classof (const InputFile *f) { return f->kind () == BitcodeKind; }
378380 ArrayRef<Symbol *> getSymbols () { return symbols; }
379- MachineTypes getMachineType () override ;
381+ MachineTypes getMachineType () const override ;
380382 void parseLazy ();
381383 std::unique_ptr<llvm::lto::InputFile> obj;
382384
@@ -393,7 +395,7 @@ class DLLFile : public InputFile {
393395 : InputFile(ctx, DLLKind, m) {}
394396 static bool classof (const InputFile *f) { return f->kind () == DLLKind; }
395397 void parse () override ;
396- MachineTypes getMachineType () override ;
398+ MachineTypes getMachineType () const override ;
397399
398400 struct Symbol {
399401 StringRef dllName;
0 commit comments