Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
LGTM
But I believe a better way of doing this kind of stuff is to define toString(InputChunk *). toString() function is a common interface to stringize objects to create debug messages.
Comment Actions
But in this case the only user actually wants the filename on its own.. not the string description of the chunk. (ELF does basically exactly the same thing here BTW)
Comment Actions
Good observation, but I think we should use toString() in ELF too. toString() is there for you so that you don't need to construct a string like this, and doing this is error-prone. In this case, if file foo.o is in bar.a, toString generates something like
bar.a(foo.o):(.text)
while this string construction generates a string like
'.text' in file 'foo.o'
which isn't very helpful if you don't know which file foo.o is in.