Make the ARM AsmPrinter independent of global subtarget
authorEric Christopher <echristo@gmail.com>
Tue, 17 Feb 2015 20:02:32 +0000 (20:02 +0000)
committerEric Christopher <echristo@gmail.com>
Tue, 17 Feb 2015 20:02:32 +0000 (20:02 +0000)
commit24dded23424a047efe7111f9a83e1ec3e89fb584
tree6bff2535997341b7e9dd21c8db1082fea12bc50c
parentcd3a8ad3e75d48869cc43621933628a9d3ab41bb
Make the ARM AsmPrinter independent of global subtarget
initialization. Initialize the subtarget once per function and
migrate Emit{Start|End}OfAsmFile to either use attributes on the
TargetMachine or get information from the subtarget we'd use
for assembling. One bit (getISAEncoding) touched the general
AsmPrinter and the debug output. Handle this one by passing
the function for the subprogram down and updating all callers
and users.

The top-level-ness of the ARM attribute output for assembly is,
by nature, contrary to how we'd want to do this for an LTO
situation where we have multiple cpu architectures so this
solution is good enough for now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229528 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/AsmPrinter.h
lib/CodeGen/AsmPrinter/DwarfUnit.cpp
lib/Target/ARM/ARMAsmPrinter.cpp
lib/Target/ARM/ARMAsmPrinter.h
lib/Target/ARM/ARMTargetMachine.h