Inspired by discussions on D127369, we probably can further improve LLVM's COFF
section name parsing. Hopefully, this makes the logic simpler and handles some
edge cases more elegantly.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Thanks, this is a good idea.
llvm/lib/Object/COFFObjectFile.cpp | ||
---|---|---|
1159 | This can now be getAsInteger, right? |
llvm/lib/Object/COFFObjectFile.cpp | ||
---|---|---|
1159 | Compared to getAsInteger, consumeInteger is a little more error tolerant and can handle inputs like "/4abcdef". However, I haven't actually seen any input like that in the wild yet, so it's probably fine if we use getAsInteger. Thoughts? |
lgtm
llvm/lib/Object/COFFObjectFile.cpp | ||
---|---|---|
1159 | I think it would be reasonable to report an error for such a section name, so I support that change, but either way, the split code is simpler than what we currently have. |
llvm/lib/Object/COFFObjectFile.cpp | ||
---|---|---|
1159 | Agreed, will change to getAsInteger. |
This can now be getAsInteger, right?