[PATCH] Add DefinedAtom::sectionSize().

Rui Ueyama ruiu at google.com
Fri Jun 13 12:15:50 PDT 2014

Adding generic key-value pair container to DefinedAtom class will probably end up with too limited or too generic code. If we limit the type of value to int64 (or some fixed-type size), it'd be pretty easy to dump it to YAML/Native, but it's restricted so it won't solve the problems we have. On the other hand, if we allow arbitrary type, it's hard to handle and needs custom dumper for Native anyway.

The thing I'd like to focus here is not the above one, but this. Merge::mergeByLargestSection is already there, and its definition is "pick the atom according to its source section size". However it currently lacks the way to get the section size for an atom. It's just wrong. Merge::mergeByLargestSection should go away (which we don't want) or we need a way to get a section size for an atom.


More information about the llvm-commits mailing list