[project @ 2001-08-15 09:58:00 by sewardj]
[ghc-hetmet.git] / ghc / compiler / main / DriverUtil.hs
index e0141ce..ad067d6 100644 (file)
@@ -1,5 +1,5 @@
 -----------------------------------------------------------------------------
--- $Id: DriverUtil.hs,v 1.25 2001/06/27 10:14:13 rrt Exp $
+-- $Id: DriverUtil.hs,v 1.26 2001/07/23 20:19:53 sof Exp $
 --
 -- Utils for the driver
 --
@@ -14,6 +14,7 @@ module DriverUtil where
 
 import Util
 import Panic
+import Config          ( cLeadingUnderscore )
 
 import IOExts
 import Exception
@@ -66,6 +67,13 @@ softGetDirectoryContents d
          )
 
 -----------------------------------------------------------------------------
+-- Prefixing underscore to linker-level names
+prefixUnderscore :: String -> String
+prefixUnderscore
+ | cLeadingUnderscore == "YES" = ('_':)
+ | otherwise                   = id
+
+-----------------------------------------------------------------------------
 -- Utils
 
 unknownFlagErr :: String -> a