diff options
| author | Russ Cox <rsc@golang.org> | 2015-01-12 15:17:10 -0500 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2015-01-14 19:18:05 +0000 |
| commit | 3be0a0ef6fb80d099aefdba67b68df3b500188bc (patch) | |
| tree | 8330ebaf4e92310212d0f383179b1065c3d0ca26 /src/liblink/pass.c | |
| parent | 5bfed7c6c03bf3cc9a0a1d7a0ab056b9dfaae920 (diff) | |
| download | go-3be0a0ef6fb80d099aefdba67b68df3b500188bc.tar.xz | |
liblink: adjustments for c2go conversion
Mostly this is using uint32 instead of int32 for unsigned values
like instruction encodings or float32 bit representations,
removal of ternary operations, and removal of #defines.
Delete sched9.c, because it is not compiled (it is still in the history
if we ever need it).
Change-Id: I68579cfea679438a27a80416727a9af932b088ae
Reviewed-on: https://go-review.googlesource.com/2658
Reviewed-by: Austin Clements <austin@google.com>
Diffstat (limited to 'src/liblink/pass.c')
| -rw-r--r-- | src/liblink/pass.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/liblink/pass.c b/src/liblink/pass.c index 8721a6a796..6d4db2757a 100644 --- a/src/liblink/pass.c +++ b/src/liblink/pass.c @@ -69,6 +69,7 @@ void linkpatch(Link *ctxt, LSym *sym) { int32 c; + char *name; Prog *p, *q; ctxt->cursym = sym; @@ -95,8 +96,10 @@ linkpatch(Link *ctxt, LSym *sym) q = q->link; } if(q == nil) { - ctxt->diag("branch out of range (%#ux)\n%P [%s]", - c, p, p->to.sym ? p->to.sym->name : "<nil>"); + name = "<nil>"; + if(p->to.sym) + name = p->to.sym->name; + ctxt->diag("branch out of range (%#ux)\n%P [%s]", c, p, name); p->to.type = ctxt->arch->D_NONE; } p->to.u.branch = q; |
