summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineFunction.cpp
diff options
context:
space:
mode:
authorDavid Candler <david.candler@arm.com>2019-10-31 08:55:57 +0000
committerDavid Candler <david.candler@arm.com>2019-10-31 09:48:30 +0000
commit92aa0c2dbcb723d102c508f6e7559330b637f912 (patch)
treec4935901211b87e2c4988d5a01110f9d3ce300f3 /llvm/lib/CodeGen/MachineFunction.cpp
parent9c739252261ea762d1bbbd8234d93c9038711fcd (diff)
downloadbcm5719-llvm-92aa0c2dbcb723d102c508f6e7559330b637f912.tar.gz
bcm5719-llvm-92aa0c2dbcb723d102c508f6e7559330b637f912.zip
[cfi] Add flag to always generate .debug_frame
This adds a flag to LLVM and clang to always generate a .debug_frame section, even if other debug information is not being generated. In situations where .eh_frame would normally be emitted, both .debug_frame and .eh_frame will be used. Differential Revision: https://reviews.llvm.org/D67216
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineFunction.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp
index d75e77d4613..115aad3880f 100644
--- a/llvm/lib/CodeGen/MachineFunction.cpp
+++ b/llvm/lib/CodeGen/MachineFunction.cpp
@@ -520,6 +520,13 @@ void MachineFunction::print(raw_ostream &OS, const SlotIndexes *Indexes) const {
OS << "\n# End machine code for function " << getName() << ".\n\n";
}
+/// True if this function needs frame moves for debug or exceptions.
+bool MachineFunction::needsFrameMoves() const {
+ return getMMI().hasDebugInfo() ||
+ getTarget().Options.ForceDwarfFrameSection ||
+ F.needsUnwindTableEntry();
+}
+
namespace llvm {
template<>
OpenPOWER on IntegriCloud