[PATCH] [lld] add calls to nativereader/nativewriter

Shankar Kalpathi Easwaran shankarke at gmail.com
Thu Oct 17 19:40:59 PDT 2013


  The method you are proposing has two problems :-

  a) Mutable file doesnot own all the atoms, Its SimpleFile thats derived from MutableFile.
  b) Copying and replacing the definedAtoms and copying the file attributes is slow (like what you said before)

  Could we just have the interface to be as below :-

  Pass::perform(std::unique_ptr<File> &file>)

  Resolver would still return MergedFile, and all of the passes would still treat the file being passed in as a MutableFile, by dyn_casting it.

  Since the ReaderWriterYAML / ReaderWriterNativePass would run only at the end, this would replace the MutableFile with a File object at the end of the pass.

  Thoughts ?

http://llvm-reviews.chandlerc.com/D1955



More information about the llvm-commits mailing list