Skip to content

Commit

Permalink
[Refactoring] Remove unused code for 'symfile'
Browse files Browse the repository at this point in the history
  • Loading branch information
9rnsr committed Aug 9, 2014
1 parent c5b285d commit 0ee0597
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 34 deletions.
1 change: 0 additions & 1 deletion src/mars.c
Expand Up @@ -94,7 +94,6 @@ Global global;
void Global::init()
{
mars_ext = "d";
sym_ext = "d";
hdr_ext = "di";
doc_ext = "html";
ddoc_ext = "ddoc";
Expand Down
1 change: 0 additions & 1 deletion src/mars.h
Expand Up @@ -216,7 +216,6 @@ struct Ungag
struct Global
{
const char *mars_ext;
const char *sym_ext;
const char *obj_ext;
const char *lib_ext;
const char *dll_ext;
Expand Down
30 changes: 0 additions & 30 deletions src/module.c
Expand Up @@ -49,7 +49,6 @@ Module::Module(const char *filename, Identifier *ident, int doDocComment, int do
: Package(ident)
{
const char *srcfilename;
const char *symfilename;

// printf("Module::Module(filename = '%s', ident = '%s')\n", filename, ident->toChars());
this->arg = filename;
Expand Down Expand Up @@ -118,16 +117,13 @@ Module::Module(const char *filename, Identifier *ident, int doDocComment, int do

objfile = setOutfile(global.params.objname, global.params.objdir, filename, global.obj_ext);

symfilename = FileName::forceExt(filename, global.sym_ext);

if (doDocComment)
setDocfile();

if (doHdrGen)
hdrfile = setOutfile(global.params.hdrname, global.params.hdrdir, arg, global.hdr_ext);

//objfile = new File(objfilename);
symfile = new File(symfilename);
}

Module *Module::create(const char *filename, Identifier *ident, int doDocComment, int doHdrGen)
Expand Down Expand Up @@ -783,32 +779,6 @@ void Module::semantic3()
semanticRun = PASSsemantic3done;
}

/****************************************************
*/

void Module::gensymfile()
{
OutBuffer buf;
HdrGenState hgs;

//printf("Module::gensymfile()\n");

buf.printf("// Sym file generated from '%s'", srcfile->toChars());
buf.writenl();

for (size_t i = 0; i < members->dim; i++)
{
Dsymbol *s = (*members)[i];
s->toCBuffer(&buf, &hgs);
}

// Transfer image to file
symfile->setbuffer(buf.data, buf.offset);
buf.data = NULL;

writeFile(loc, symfile);
}

/**********************************
* Determine if we need to generate an instance of ModuleInfo
* for this Module.
Expand Down
2 changes: 0 additions & 2 deletions src/module.h
Expand Up @@ -79,7 +79,6 @@ class Module : public Package
File *srcfile; // input source file
File *objfile; // output .obj file
File *hdrfile; // 'header' file
File *symfile; // output symbol file
File *docfile; // output documentation file
unsigned errors; // if any errors in file
unsigned numlines; // number of lines in source file
Expand Down Expand Up @@ -134,7 +133,6 @@ class Module : public Package
void semantic3(); // pass 3 semantic analysis
void genobjfile(bool multiobj);
void genhelpers(bool iscomdat);
void gensymfile();
int needModuleInfo();
Dsymbol *search(Loc loc, Identifier *ident, int flags = IgnoreNone);
Dsymbol *symtabInsert(Dsymbol *s);
Expand Down

0 comments on commit 0ee0597

Please sign in to comment.