[PATCH] Select new undefined atom rather than old one if other conditions are the same.

kledzik at apple.com kledzik at apple.com
Thu Nov 14 16:53:57 PST 2013


  I understand the need to check that the fallback is not being changed or lost, but why change the behavior to keep switching to newer undefines?  In the current impl, if there are bunch of .o files and each one has an undefine for _malloc, the UndefinedAtom from the first .o file will be put in the symbol table, and the rest will entered in the the replacement map to be replaced by the first.  If instead you keep changing the symbol table entry for malloc when processing each .o file, you get a long chain in the replacement map where the first UndefinedAtom is to be replaced by the second which is to be replaced by the third, etc.

  Seems to me there are three steps here:
  1) warn if the new and current undefined atoms have different can-be-null
  2) warn if the new and current undefined atoms have different fallback names
  3) only switch the current undefined atom to be another one if it is "better" (has fallback or can't be null).

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



More information about the llvm-commits mailing list