'-fsave-optimization-record' and VS2015 built compiler

Hi CFE-Devs,

I had posted the following question on LLVM-Dev but it seems more appropriate to CFE-Dev. It appears that the temporary YAML file is being left in the TMP directory and not promoted to its final intended location.

Thanks,

MartinO

Hi again,

What version of the compiler are you using? I’m wondering if this was fixed by r311041+r311043.

-Hal

Hi Hal,

I am still using the LLVM v4.0 sources, haven’t yet had a chance to do the “Big Bang” update to v5.0, but hope to get to that soon.

I’ve check out these patches and see if they fix the problem before I consider filing a bug. Curiously enough, on Linux the file is named ‘<basename>.opt.yaml’ in the current directory, but on Windows it gets the name ‘<TMP><basename>-######.opt.yaml’, so it appears that on Linux it is written directly to the intended final file, while on Windows it gets an intermediate temporary file name.

Thanks very much for your insight and help,

MartinO

Yes, that sounds like the problem that I fixed. As a workaround, you can also specify the file name manually: -foptimization-record-file= -Hal