auto remove unused function arguments from call chain

Newbie2019 newbie2019 at gmail.com
Sat Nov 16 04:22:17 UTC 2019


Is it possible to add optimization to remove unused  function 
arguments in binary generate ?

for example:

```d


void doWork(int args, string file, size_t line) {
     version(DEV_DEBUG) {
        Log.i("info from file %s line %d", file, line);
     }
    do_the_real_work();
}


void myApp(string file = __FILE__, size_t line = __LINE__){
     doWork(args, file, line);
}
```


when build without version DEV_DEBUG, the file and line is never 
used.  will ldc able to auto remove it from the binary code ?





More information about the digitalmars-d-ldc mailing list