[cfe-dev] Odd behaviour with '-save-temps' and OpenCL files

Joerg Sonnenberger via cfe-dev cfe-dev at lists.llvm.org
Sun Nov 6 03:04:43 PST 2016


On Sun, Nov 06, 2016 at 10:01:05AM +0000, mats petersson via cfe-dev wrote:
> My guess, and it's only a guess, is that -save-temps causes the compiler to
> run each step on those files, by executing independent processes, rather
> than the usual "run all steps in parallel" - in my understanding, Clang
> doesn't actually work in the "old style cc way" and running several
> processes with files produced between each step.

Yes and no. -svae-temps will run the parser on the preprocessed output,
so all macro-expansion knowledge is missing. That changes the impact of
a number of warnings like redundant braces. Pragmas are still preserved
in the code though. It would be a bug in the OpenCL integration if the
pragmas are no longer processed OR if pragmas are silently attached to
macros by position.

Joerg



More information about the cfe-dev mailing list