summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2018-08-23 17:37:23 +0200
committerAndreas Rumpf <rumpf_a@web.de>2018-08-23 17:37:23 +0200
commit1546826006ca8debf245f712e398813f12bcd7d6 (patch)
treeb82aa8511dd3c429f8557a33edb47ddcc4a2ce34 /compiler
parentae0255ea6723c1b271d5064ea4e69fb994520102 (diff)
downloadNim-1546826006ca8debf245f712e398813f12bcd7d6.tar.gz
add nimHasWarningX and nimHasHintX defines for feature detection purposes
Diffstat (limited to 'compiler')
-rw-r--r--compiler/condsyms.nim6
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/condsyms.nim b/compiler/condsyms.nim
index 0cf264ac3..78645b6fd 100644
--- a/compiler/condsyms.nim
+++ b/compiler/condsyms.nim
@@ -13,6 +13,7 @@ import
   strtabs, platform, strutils, idents
 
 from options import Feature
+from lineinfos import HintsToStr, WarningsToStr
 
 const
   catNone = "false"
@@ -83,3 +84,8 @@ proc initDefines*(symbols: StringTableRef) =
   defineSymbol("nimHasNilSeqs")
   for f in low(Feature)..high(Feature):
     defineSymbol("nimHas" & $f)
+
+  for s in WarningsToStr:
+    defineSymbol("nimHasWarning" & s)
+  for s in HintsToStr:
+    defineSymbol("nimHasHint" & s)