更新时间:2023-01-19 12:47:30
实际上,删除变量名是一项功能,需要使用-discard-value-names
激活.发布版本中的Clang会自己执行此操作(不是在调试模式下使用自编译的Clang).
Actually dropping of variable names is a feature and needs to be activated with -discard-value-names
. Clang in a release build does this by its own (a self compiled clang in debug mode not).
您可以使用
clang <your-command-line> -###
然后复制输出并删除-discard-value-names
.
较新的clang版本(从7开始)将标志公开给普通命令行:
Newer clang version (since 7) expose the flag to the normal command line:
clang -fno-discard-value-names <your-command-line>