Skip to content

Commit 02134fd

Browse files
committed
---
yaml --- r: 893 b: refs/heads/master c: ffb3861 h: refs/heads/master i: 891: b73bb95 v: v3
1 parent a54a870 commit 02134fd

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

[refs]

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: c1fb592f620bf29d854d64816974c478d567e578
2+
refs/heads/master: ffb3861c7076345f2e43497e5079e9a970571ff0

trunk/src/comp/back/x86.rs

+10-4
Original file line numberDiff line numberDiff line change
@@ -127,13 +127,19 @@ fn decl_upcall_glue(int align, str prefix, uint n) -> str {
127127
upcall_glue(i));
128128
}
129129

130+
fn get_symbol_prefix() -> str {
131+
if (_str.eq(target_os(), "macos") ||
132+
_str.eq(target_os(), "win32")) {
133+
ret "_";
134+
} else {
135+
ret "";
136+
}
137+
}
138+
130139
fn get_module_asm() -> str {
131140
auto align = 4;
132141

133-
auto prefix = "";
134-
if (_str.eq(target_os(), "macos")) {
135-
prefix = "_";
136-
}
142+
auto prefix = get_symbol_prefix();
137143

138144
auto glues =
139145
vec(decl_glue(align, prefix,

0 commit comments

Comments
 (0)