[IR] Update CreateCatchRet to take a return value
[oota-llvm.git] / include / llvm / IR / Function.h
index ec9f4cad094ad676289ae0cb57508be45892b8ed..ef7274b4bc66b8ec69095171ecb2597a6c4626cc 100644 (file)
@@ -395,6 +395,16 @@ public:
     addAttribute(n, Attribute::ReadOnly);
   }
 
+  /// Optimize this function for minimum size (-Oz).
+  bool optForMinSize() const {
+    return hasFnAttribute(Attribute::MinSize);
+  };
+  
+  /// Optimize this function for size (-Os) or minimum size (-Oz).
+  bool optForSize() const {
+    return hasFnAttribute(Attribute::OptimizeForSize) || optForMinSize();
+  }
+
   /// copyAttributesFrom - copy all additional attributes (those not needed to
   /// create a Function) from the Function Src to this one.
   void copyAttributesFrom(const GlobalValue *Src) override;