diff options
author | Renato Golin <renato.golin@linaro.org> | 2014-09-24 20:07:22 +0000 |
---|---|---|
committer | Renato Golin <renato.golin@linaro.org> | 2014-09-24 20:07:22 +0000 |
commit | 2b25450061e38710dbf531d4a1e7d30c776fd1fd (patch) | |
tree | 1a9ea15b74fbfe38a8d62683a8fdf53247ee8cac /llvm/lib/MC/StringTableBuilder.cpp | |
parent | ad6eee639952090684aa84c35218ec327a017ca1 (diff) | |
download | llvm-2b25450061e38710dbf531d4a1e7d30c776fd1fd.zip llvm-2b25450061e38710dbf531d4a1e7d30c776fd1fd.tar.gz llvm-2b25450061e38710dbf531d4a1e7d30c776fd1fd.tar.bz2 |
Refactor the RelocVisitor::visit method
This change replaces the brittle if/else chain of string comparisons
with a switch statement on the detected target triple, removing the
need for testing arbitrary architecture names returned from
getFileFormatName, whose primary purpose seems to be for display
(user-interface) purposes. The visitor now takes a reference to the
object file, rather than its arbitrary file format name to figure out
whether the file is a 32 or 64-bit object file and what the detected
target triple is.
A set of tests have been added to help show that the refactoring processes
relocations for the same targets as the original code.
Patch by Charlie Turner.
llvm-svn: 218406
Diffstat (limited to 'llvm/lib/MC/StringTableBuilder.cpp')
0 files changed, 0 insertions, 0 deletions