[PATCH] Move nextFile() from LinkingContext to InputGraph.

Rui Ueyama ruiu at google.com
Tue Apr 1 20:27:38 PDT 2014


Hi Bigcheese, shankarke, kledzik,

LinkingContext and InputGraph are unnecessarily entangled. Most linker
input file data, e.g. the vector containing input files, the next index
of the input file, etc. are managed by InputGraph, but only the current
input file is for no obvious reason managed by LinkingContext.

This patch is to move code from LinkingContext to InputGraph to fix it.
It's now clear who's reponsible for managing input file state, which is
InputGraph, and LinkingContext is now free from that responsibility.
It improves the readability as we now have fewer dependencies between
classes. No functionality change.

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

Files:
  include/lld/Core/InputGraph.h
  include/lld/Core/LinkingContext.h
  lib/Core/InputGraph.cpp
  lib/Core/LinkingContext.cpp
  lib/Core/Resolver.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D3259.1.patch
Type: text/x-patch
Size: 8912 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140401/33e18146/attachment.bin>


More information about the llvm-commits mailing list