summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2015-03-21 03:13:01 +0000
committerEric Christopher <echristo@gmail.com>2015-03-21 03:13:01 +0000
commitcd53d6eda794edbda5550253faba66f67bc6d2fb (patch)
treef5f710b89af0d12764aafa0a8d792c99ab85d684 /llvm/lib/Target
parent23a7d1e6f4d35f5f184e41dc949d4f5cd5f356e9 (diff)
downloadbcm5719-llvm-cd53d6eda794edbda5550253faba66f67bc6d2fb.tar.gz
bcm5719-llvm-cd53d6eda794edbda5550253faba66f67bc6d2fb.zip
Change getISAEncoding to use the target triple to determine
thumb-ness similar to the rest of the Module level asm printing infrastructure as debug info finalization happens after the function may be missing. llvm-svn: 232875
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/ARM/ARMAsmPrinter.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/lib/Target/ARM/ARMAsmPrinter.h b/llvm/lib/Target/ARM/ARMAsmPrinter.h
index 50cb9540411..e475ae43a6d 100644
--- a/llvm/lib/Target/ARM/ARMAsmPrinter.h
+++ b/llvm/lib/Target/ARM/ARMAsmPrinter.h
@@ -103,13 +103,16 @@ private:
const MachineInstr *MI);
public:
- unsigned getISAEncoding(const Function *F) override {
+ unsigned getISAEncoding() override {
// ARM/Darwin adds ISA to the DWARF info for each function.
Triple TT(TM.getTargetTriple());
if (!TT.isOSBinFormatMachO())
return 0;
- const ARMSubtarget &STI = TM.getSubtarget<ARMSubtarget>(*F);
- return STI.isThumb() ? ARM::DW_ISA_ARM_thumb : ARM::DW_ISA_ARM_arm;
+ bool isThumb = TT.getArch() == Triple::thumb ||
+ TT.getArch() == Triple::thumbeb ||
+ TT.getSubArch() == Triple::ARMSubArch_v7m ||
+ TT.getSubArch() == Triple::ARMSubArch_v6m;
+ return isThumb ? ARM::DW_ISA_ARM_thumb : ARM::DW_ISA_ARM_arm;
}
private:
OpenPOWER on IntegriCloud