Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
46281d3a
Commit
46281d3a
authored
Jul 20, 2010
by
dterei
Browse files
LLVM: Fix OSX to work again with TNTC disabled.
parent
4040304d
Changes
1
Hide whitespace changes
Inline
Side-by-side
compiler/llvmGen/LlvmMangler.hs
View file @
46281d3a
...
...
@@ -19,12 +19,13 @@ import qualified Data.ByteString.Char8 as BS
import
LlvmCodeGen.Ppr
(
infoSection
,
iTableSuf
)
import
Util
{- Configuration. -}
newSection
,
oldSection
,
functionSuf
,
tableSuf
,
funDivider
,
eol
::
ByteString
newSection
=
BS
.
pack
"
\n
.text
\n
"
oldSection
=
BS
.
pack
infoSection
functionSuf
=
BS
.
pack
"_info:
"
functionSuf
=
BS
.
pack
$
if
ghciTablesNextToCode
then
"_info:"
else
"
\n
_
"
tableSuf
=
BS
.
pack
$
"_info"
++
iTableSuf
++
":"
funDivider
=
BS
.
pack
"
\n\n
"
eol
=
BS
.
pack
"
\n
"
...
...
@@ -124,13 +125,18 @@ oneTable f str =
BS
.
appendFile
f
bl
return
BS
.
empty
else
if
BS
.
null
itable
then
error
$
"Function without matching info table! ("
++
(
BS
.
unpack
label
)
++
")"
else
if
ghciTablesNextToCode
then
if
BS
.
null
itable
then
error
$
"Function without matching info table! ("
++
(
BS
.
unpack
label
)
++
")"
else
do
mapM_
(
BS
.
appendFile
f
)
function
return
remainder
else
do
mapM_
(
BS
.
appendFile
f
)
function
return
remainder
-- TNTC not turned on so just fix up stack
mapM_
(
BS
.
appendFile
f
)
[
before
,
fheader
,
fun'
]
return
after
-- | Replace the current section in a function or table header with the
-- text section specifier.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment