Can I see what is eliminated by the Visual C ++ / OPT: REF option?
The / OPT (Optimization) in the Notes section states:
You can use the VERBOSE option to see functions removed with / OPT: REF and functions folded with / OPT: ICF.
I haven't tried using it for your purposes yet.
Alternatively, you can refer to SO Question 641826 to exclude compiler generated characters if you take the route given by @JamesMcNellis' answer .
source to share
It's not perfect, but ...
You can make two assemblies, one with /OPT:REF
and one without, then run dumpbin /symbols
on the resulting binaries, parse the symbols, and strip the results. The trick will weed out the library symbols, so you're left with just symbols. Since you will have a list of mutilated names, it won't be pretty.
I don't know how to get the linker to just tell you what it is deleting.
source to share