Use a continue to reduce indentation.
[oota-llvm.git] / lib / CodeGen / TargetOptionsImpl.cpp
index 9d1c27ef51e857cfcde50573c789c934f7a70583..8d2048fa047f0941a6896dfc24a2c1ec0c7cd335 100644 (file)
@@ -47,37 +47,3 @@ bool TargetOptions::LessPreciseFPMAD() const {
 bool TargetOptions::HonorSignDependentRoundingFPMath() const {
   return !UnsafeFPMath && HonorSignDependentRoundingFPMathOption;
 }
-
-/// getTrapFunctionName - If this returns a non-empty string, this means isel
-/// should lower Intrinsic::trap to a call to the specified function name
-/// instead of an ISD::TRAP node.
-StringRef TargetOptions::getTrapFunctionName() const {
-  return TrapFuncName;
-}
-
-
-void llvm::setFunctionAttributes(StringRef CPU, StringRef Features,
-                                 const TargetOptions &Options, Module &M,
-                                 bool AlwaysRecordAttrs) {
-  for (auto &F : M) {
-    auto &Ctx = F.getContext();
-    AttributeSet Attrs = F.getAttributes(), NewAttrs;
-
-    if (!CPU.empty())
-      NewAttrs = NewAttrs.addAttribute(Ctx, AttributeSet::FunctionIndex,
-                                       "target-cpu", CPU);
-
-    if (!Features.empty())
-      NewAttrs = NewAttrs.addAttribute(Ctx, AttributeSet::FunctionIndex,
-                                       "target-features", Features);
-
-    if (Options.NoFramePointerElimOverride || AlwaysRecordAttrs)
-      NewAttrs = NewAttrs.addAttribute(
-          Ctx, AttributeSet::FunctionIndex, "no-frame-pointer-elim",
-          Options.NoFramePointerElim ? "true" : "false");
-
-    // Let NewAttrs override Attrs.
-    NewAttrs = Attrs.addAttributes(Ctx, AttributeSet::FunctionIndex, NewAttrs);
-    F.setAttributes(NewAttrs);
-  }
-}