Displaying 2 results from an estimated 2 matches for "__file_name__".
2014 Sep 20
2
[LLVMdev] Optimization of string.h calls
...come a merged constant? Perhaps there is simply not much use for a string-optimizing feature since reducing program size isn’t a goal for most developers these days?
Then, more to the point, I wonder if there shouldn’t be a macro in clang/llvm for returning only the current source file name, e.g. __FILE_NAME__. I don’t know what the feeling is on introducing macros that do not exist in gcc, since it seems that up until now the approach has been quite conservative. Does no one else have a desire to easily suppress the full hard drive paths that will show up in their binaries with the use of __FILE__? O...
2014 Sep 19
2
[LLVMdev] Optimization of string.h calls
Hello all. Is there a way to get llvm/clang at build-time to optimize a string.h call so that the final form of the string is saved in the binary? For instance, for a statement like...
strrchr(__FILE__, '/') + 1
…and where clang is called on this code’s source file with “clang /some/long/path/file.c”, can I end up with only “file.c” stored in the binary on disk? I think you can see