summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/settings/ScalaSettings.scala
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@gmail.com>2015-03-30 16:19:25 +0200
committerLukas Rytz <lukas.rytz@gmail.com>2015-04-01 08:35:32 +0200
commit638ed9108f10bcbebb69f2fefe05c7423c8bdfd7 (patch)
tree5d5f091be9e720df20ba18df87090ca4a95de19c /src/compiler/scala/tools/nsc/settings/ScalaSettings.scala
parenteb43d62b4e0665b6b509a04d4ec2edae53c9256b (diff)
downloadscala-638ed9108f10bcbebb69f2fefe05c7423c8bdfd7.tar.gz
scala-638ed9108f10bcbebb69f2fefe05c7423c8bdfd7.tar.bz2
scala-638ed9108f10bcbebb69f2fefe05c7423c8bdfd7.zip
Clean up the way compiler settings are accessed in the backend.
Many backend components don't have access to the compiler instance holding the settings. Before this change, individual settings required in these parts of the backend were made available as members of trait BTypes, implemented in the subclass BTypesFromSymbols (which has access to global). This change exposes a single value of type ScalaSettings in the super trait BTypes, which gives access to all compiler settings.
Diffstat (limited to 'src/compiler/scala/tools/nsc/settings/ScalaSettings.scala')
-rw-r--r--src/compiler/scala/tools/nsc/settings/ScalaSettings.scala9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/settings/ScalaSettings.scala b/src/compiler/scala/tools/nsc/settings/ScalaSettings.scala
index ee683418d9..9d7cf8cfaa 100644
--- a/src/compiler/scala/tools/nsc/settings/ScalaSettings.scala
+++ b/src/compiler/scala/tools/nsc/settings/ScalaSettings.scala
@@ -282,6 +282,15 @@ trait ScalaSettings extends AbsScalaSettings
else YinlinerWarnings.value = true
})
+ def YoptWarningEmitAtInlineFailed =
+ !YoptWarnings.isSetByUser ||
+ YoptWarnings.contains(YoptWarningsChoices.atInlineFailedSummary) ||
+ YoptWarnings.contains(YoptWarningsChoices.atInlineFailed)
+
+ def YoptWarningNoInlineMixed = YoptWarnings.contains(YoptWarningsChoices.noInlineMixed)
+ def YoptWarningNoInlineMissingBytecode = YoptWarnings.contains(YoptWarningsChoices.noInlineMissingBytecode)
+ def YoptWarningNoInlineMissingScalaInlineInfoAttr = YoptWarnings.contains(YoptWarningsChoices.noInlineMissingScalaInlineInfoAttr)
+
private def removalIn212 = "This flag is scheduled for removal in 2.12. If you have a case where you need this flag then please report a bug."
object YstatisticsPhases extends MultiChoiceEnumeration { val parser, typer, patmat, erasure, cleanup, jvm = Value }