[Remarks][Driver] Use different remark files when targeting multiple architectures
authorFrancis Visoiu Mistrih <francisvm@yahoo.com>
Mon, 18 Nov 2019 18:09:31 +0000 (10:09 -0800)
committerFrancis Visoiu Mistrih <francisvm@yahoo.com>
Mon, 18 Nov 2019 18:38:10 +0000 (10:38 -0800)
commitb4e2b112b58154a89171df39dae80044865ff4ff
treeadca3f65a1a2250cc23fa1eb79a4d1830b288a20
parent1689ad27af5c5712f42542807eb4ecdfe84c2eca
[Remarks][Driver] Use different remark files when targeting multiple architectures

When the driver is targeting multiple architectures at once, for things
like Universal Mach-Os, we need to emit different remark files for each
cc1 invocation to avoid overwriting the files from a different
invocation.

For example:

$ clang -c -o foo.o -fsave-optimization-record -arch x86_64 -arch x86_64h

will create two remark files:

* foo-x86_64.opt.yaml
* foo-x86_64h.opt.yaml
clang/lib/Driver/ToolChains/Clang.cpp
clang/test/Driver/opt-record.c