Skip to content

Commit

Permalink
Merge pull request #5371 from WalterBright/symbol_print
Browse files Browse the repository at this point in the history
remove some #if's around symbol_print()
  • Loading branch information
yebblies committed Jan 28, 2016
2 parents e270c16 + 06e67bf commit 8010e3d
Show file tree
Hide file tree
Showing 11 changed files with 3 additions and 40 deletions.
2 changes: 0 additions & 2 deletions src/backend/cgcod.c
Expand Up @@ -1227,9 +1227,7 @@ void stackoffsets(int flags)
case SCbprel:
break;
default:
#ifdef DEBUG
symbol_print(s);
#endif
assert(0);
}
}
Expand Down
2 changes: 0 additions & 2 deletions src/backend/cgcv.c
Expand Up @@ -971,9 +971,7 @@ idx_t cv4_struct(Classsym *s,int flags)
}
break;
default:
#if SCPP
symbol_print(s);
#endif
assert(0);
}
TOWORD(d->data,leaf);
Expand Down
6 changes: 0 additions & 6 deletions src/backend/cgobj.c
Expand Up @@ -2326,9 +2326,7 @@ size_t Obj::mangle(Symbol *s,char *dest)
dest[1 + len] = 0;
break;
default:
#ifdef DEBUG
symbol_print(s);
#endif
assert(0);
}
if (ilen > (255-2-sizeof(int)*3))
Expand Down Expand Up @@ -2752,9 +2750,7 @@ STATIC void obj_modend()
offset += s->Soffset;
break;
default:
#ifdef DEBUG
//symbol_print(s);
#endif
assert(0);
}

Expand Down Expand Up @@ -3442,9 +3438,7 @@ int Obj::reftoident(int seg,targ_size_t offset,Symbol *s,targ_size_t val,
val += s->Soffset;
break;
default:
#ifdef DEBUG
symbol_print(s);
#endif
assert(0);
}

Expand Down
2 changes: 0 additions & 2 deletions src/backend/cgreg.c
Expand Up @@ -674,9 +674,7 @@ void cgreg_map(Symbol *s, unsigned regmsw, unsigned reglsw)
s->Sfl = FLstack;
break;
default:
#ifdef DEBUG
symbol_print(s);
#endif
assert(0);
}
}
Expand Down
4 changes: 0 additions & 4 deletions src/backend/cod1.c
Expand Up @@ -1324,9 +1324,7 @@ code *getlvalue(code *pcs,elem *e,regm_t keepmsk)
L2:
if (fl == FLreg)
{
#ifdef DEBUG
if (!(s->Sregm & regcon.mvar)) symbol_print(s);
#endif
assert(s->Sregm & regcon.mvar);

/* Attempting to paint a float as an integer or an integer as a float
Expand Down Expand Up @@ -1442,9 +1440,7 @@ code *getlvalue(code *pcs,elem *e,regm_t keepmsk)

default:
WRFL((enum FL)fl);
#ifdef DEBUG
symbol_print(s);
#endif
assert(0);
}
return c;
Expand Down
6 changes: 1 addition & 5 deletions src/backend/cod3.c
Expand Up @@ -4942,9 +4942,7 @@ targ_size_t cod3_bpoffset(symbol *s)
break;
default:
WRFL((enum FL)s->Sfl);
#ifdef DEBUG
symbol_print(s);
#endif
assert(0);
}
assert(hasframe);
Expand Down Expand Up @@ -6492,9 +6490,7 @@ static void do64bit(MiniCodeBuf *pbuf, enum FL fl,union evc *uev,int flags)
#if TARGET_SEGMENTED
case FLcsdata:
case FLfardata:
#if DEBUG
symbol_print(uev->sp.Vsym);
#endif
//symbol_print(uev->sp.Vsym);
#endif
// NOTE: In ELFOBJ all symbol refs have been tagged FLextern
// strings and statics are treated like offsets from a
Expand Down
2 changes: 0 additions & 2 deletions src/backend/elfobj.c
Expand Up @@ -3031,9 +3031,7 @@ int Obj::reftoident(int seg, targ_size_t offset, Symbol *s, targ_size_t val,
goto case_SCcomdat; // treat as initialized common block

default:
#ifdef DEBUG
//symbol_print(s);
#endif
assert(0);
}
return retsize;
Expand Down
4 changes: 0 additions & 4 deletions src/backend/global.h
Expand Up @@ -320,11 +320,7 @@ void symbol_keep(Symbol *s);
#else
#define symbol_keep(s) ((void)(s))
#endif
#ifdef DEBUG
void symbol_print(Symbol *s);
#else
#define symbol_print(s)
#endif
void symbol_term(void);
char *symbol_ident(symbol *s);
Symbol *symbol_calloc(const char *id);
Expand Down
6 changes: 0 additions & 6 deletions src/backend/newman.c
Expand Up @@ -577,9 +577,7 @@ STATIC int cpp_protection(symbol *s)
case SFLprotected: i = 1; break;
case SFLpublic: i = 2; break;
default:
#ifdef DEBUG
symbol_print(s);
#endif
assert(0);
}
return i;
Expand Down Expand Up @@ -1205,9 +1203,7 @@ STATIC void cpp_argument_list(type *t, int flag)
ty = tybasic(t->Tty);
if (ty <= TYldouble && ty != TYenum
&& ty != TYbool // added for versions >= 8.1b9
#if OVERLOAD_CV_PARAM
&& !(t->Tty & (mTYconst | mTYvolatile))
#endif
)
{
cpp_primary_data_type(t);
Expand All @@ -1219,7 +1215,6 @@ STATIC void cpp_argument_list(type *t, int flag)
{
if (i == mangle.argi) // no match
{
#if OVERLOAD_CV_PARAM
if (ty <= TYcldouble || ty == TYstruct)
{
int cvidx = cpp_cvidx(t->Tty);
Expand All @@ -1230,7 +1225,6 @@ STATIC void cpp_argument_list(type *t, int flag)
CHAR('N' + cvidx); // _O, _P, _Q prefix
}
}
#endif
if (flag && tybasic(t->Tty) == TYarray)
{
cpp_reference_data_type(t, flag);
Expand Down
4 changes: 0 additions & 4 deletions src/backend/out.c
Expand Up @@ -674,10 +674,8 @@ STATIC void outelem(elem *e)
cpperr(EM_no_template_instance, s->Sident);
break;
default:
#ifdef DEBUG
symbol_print(s);
WRclass((enum SC) s->Sclass);
#endif
assert(0);
#endif
}
Expand Down Expand Up @@ -1070,9 +1068,7 @@ STATIC void writefunc2(symbol *sfunc)
s->Sfl = FLstack;
break;
default:
#ifdef DEBUG
symbol_print(s);
#endif
assert(0);
}
}
Expand Down
5 changes: 2 additions & 3 deletions src/backend/symbol.c
Expand Up @@ -110,10 +110,9 @@ void symtab_free(symbol **tab)
* Type out symbol information.
*/

#ifdef DEBUG

void symbol_print(symbol *s)
{
#ifdef DEBUG
#if !SPP
if (!s) return;
dbg_printf("symbol %p '%s'\n ",s,s->Sident);
Expand Down Expand Up @@ -152,9 +151,9 @@ void symbol_print(symbol *s)
}
#endif
#endif
#endif
}

#endif

/*********************************
* Terminate use of symbol table.
Expand Down

0 comments on commit 8010e3d

Please sign in to comment.