Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
GHC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
4,325
Issues
4,325
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
361
Merge Requests
361
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
317d1074
Commit
317d1074
authored
Oct 02, 2011
by
Ian Lynagh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove remaining CPP from cmm/CLabel.hs
parent
b5b10708
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
26 deletions
+15
-26
compiler/cmm/CLabel.hs
compiler/cmm/CLabel.hs
+15
-26
No files found.
compiler/cmm/CLabel.hs
View file @
317d1074
...
...
@@ -110,8 +110,6 @@ module CLabel (
pprCLabel
)
where
#
include
"HsVersions.h"
import
IdInfo
import
StaticFlags
import
BasicTypes
...
...
@@ -896,11 +894,11 @@ instance PlatformOutputable CLabel where
pprCLabel
::
Platform
->
CLabel
->
SDoc
pprCLabel
_
(
AsmTempLabel
u
)
pprCLabel
platform
(
AsmTempLabel
u
)
|
cGhcWithNativeCodeGen
==
"YES"
=
getPprStyle
$
\
sty
->
if
asmStyle
sty
then
ptext
asmTempLabelPrefix
<>
pprUnique
u
ptext
(
asmTempLabelPrefix
platform
)
<>
pprUnique
u
else
char
'_'
<>
pprUnique
u
...
...
@@ -916,23 +914,22 @@ pprCLabel platform (DeadStripPreventer lbl)
|
cGhcWithNativeCodeGen
==
"YES"
=
pprCLabel
platform
lbl
<>
ptext
(
sLit
"_dsp"
)
pprCLabel
_
lbl
pprCLabel
platform
lbl
=
getPprStyle
$
\
sty
->
if
cGhcWithNativeCodeGen
==
"YES"
&&
asmStyle
sty
then
maybe_underscore
(
pprAsmCLbl
lbl
)
then
maybe_underscore
(
pprAsmCLbl
platform
lbl
)
else
pprCLbl
lbl
maybe_underscore
doc
|
underscorePrefix
=
pp_cSEP
<>
doc
|
otherwise
=
doc
#
ifdef
mingw32_TARGET_OS
-- In asm mode, we need to put the suffix on a stdcall ForeignLabel.
-- (The C compiler does this itself).
pprAsmCLbl
(
ForeignLabel
fs
(
Just
sz
)
_
_
)
=
ftext
fs
<>
char
'@'
<>
int
sz
#
endif
pprAsmCLbl
lbl
pprAsmCLbl
platform
(
ForeignLabel
fs
(
Just
sz
)
_
_
)
|
platformOS
platform
==
OSMinGW32
-- In asm mode, we need to put the suffix on a stdcall ForeignLabel.
-- (The C compiler does this itself).
=
ftext
fs
<>
char
'@'
<>
int
sz
pprAsmCLbl
_
lbl
=
pprCLbl
lbl
pprCLbl
(
StringLitLabel
u
)
...
...
@@ -1056,19 +1053,11 @@ instance Outputable ForeignLabelSource where
underscorePrefix
::
Bool
-- leading underscore on assembler labels?
underscorePrefix
=
(
cLeadingUnderscore
==
"YES"
)
asmTempLabelPrefix
::
LitString
-- for formatting labels
asmTempLabelPrefix
=
#
if
alpha_TARGET_OS
{- The alpha assembler likes temporary labels to look like $L123
instead of L123. (Don't toss the L, because then Lf28
turns into $f28.)
-}
(
sLit
"$"
)
#
elif
darwin_TARGET_OS
(
sLit
"L"
)
#
else
(
sLit
".L"
)
#
endif
asmTempLabelPrefix
::
Platform
->
LitString
-- for formatting labels
asmTempLabelPrefix
platform
=
if
platformOS
platform
==
OSDarwin
then
sLit
"L"
else
sLit
".L"
pprDynamicLinkerAsmLabel
::
Platform
->
DynamicLinkerLabelInfo
->
CLabel
->
SDoc
pprDynamicLinkerAsmLabel
platform
dllInfo
lbl
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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