Add a target hook to encode the compact unwind information.
[oota-llvm.git] / include / llvm / Target / TargetFrameLowering.h
index e104b1663fdd72225c0cfbee31736f557752fcee..70cecbd37fb4366f6cd5a6969c9fe4f9ad1cecee 100644 (file)
@@ -14,6 +14,7 @@
 #ifndef LLVM_TARGET_TARGETFRAMELOWERING_H
 #define LLVM_TARGET_TARGETFRAMELOWERING_H
 
+#include "llvm/MC/MCDwarf.h"
 #include "llvm/CodeGen/MachineBasicBlock.h"
 
 #include <utility>
@@ -189,6 +190,14 @@ public:
   ///
   virtual void processFunctionBeforeFrameFinalized(MachineFunction &MF) const {
   }
+
+  /// getCompactUnwindEncoding - Get the compact unwind encoding for the
+  /// function. Return 0 if the compact unwind isn't available.
+  virtual uint32_t getCompactUnwindEncoding(const std::vector<MCCFIInstruction>&,
+                                            int /*DataAlignmentFactor*/,
+                                            bool /*IsEH*/) const {
+    return 0;
+  }
 };
 
 } // End llvm namespace