This is an archive of the discontinued LLVM Phabricator instance.

[clang][ARM] Refactor ComputeLLVMTriple code for ARM
ClosedPublic

Authored by DavidSpickett on Mar 9 2021, 5:15 AM.

Details

Summary

This moves code that sets the architecture name
and Float ABI into two new functions in
ToolChains/Arch/ARM.cpp. Greatly simplifying ComputeLLVMTriple.

Some light refactoring in setArchNameInTriple to
move local variables closer to their first use.

Diff Detail

Event Timeline

DavidSpickett created this revision.Mar 9 2021, 5:15 AM
DavidSpickett requested review of this revision.Mar 9 2021, 5:15 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 9 2021, 5:15 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
DavidSpickett added a reviewer: ostannard.EditedMar 9 2021, 5:23 AM

Besides the usual motivations this is prep for fixing https://bugs.llvm.org/show_bug.cgi?id=48894 for AArch64. Which will need a similar (but simpler) set of calls.

Edit: actually it's not needed for that since on AArch64 we don't need to change the triple. Anyway, it fixes an existing TODO.

DavidSpickett retitled this revision from [clang][ARM] Refactor computeLLVMTriple code for ARM to [clang][ARM] Refactor ComputeLLVMTriple code for ARM.Mar 9 2021, 5:24 AM
DavidSpickett edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Mar 10 2021, 6:23 AM