Mercurial > projects > ldc
comparison gen/main.cpp @ 1372:229e02867307
Fix format-string bugs by adding __attribute__((__format__)) in all applicable
places and fixing all warnings my gcc produced.
Among other things, this should fix several segfaults (including one I just
ran into).
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Sun, 17 May 2009 00:15:25 +0200 |
parents | 3647bef175d7 |
children | 5855958073a9 |
comparison
equal
deleted
inserted
replaced
1371:967d28b7febe | 1372:229e02867307 |
---|---|
874 llvm::ModulePass* stripMD = createStripMetaData(); | 874 llvm::ModulePass* stripMD = createStripMetaData(); |
875 stripMD->runOnModule(*llvmModules[i]); | 875 stripMD->runOnModule(*llvmModules[i]); |
876 delete stripMD; | 876 delete stripMD; |
877 | 877 |
878 if(linker.LinkInModule(llvmModules[i], &errormsg)) | 878 if(linker.LinkInModule(llvmModules[i], &errormsg)) |
879 error(errormsg.c_str()); | 879 error("%s", errormsg.c_str()); |
880 delete llvmModules[i]; | 880 delete llvmModules[i]; |
881 } | 881 } |
882 | 882 |
883 m->deleteObjFile(); | 883 m->deleteObjFile(); |
884 writeModule(linker.getModule(), filename); | 884 writeModule(linker.getModule(), filename); |