Disable optnone function attribute:

Allows dynamic opt level setting to have an effect on functions!
This commit is contained in:
Axel Naumann 2019-01-09 18:47:49 +01:00 committed by SFT
parent 2849a2ab73
commit a2cd159178

View File

@ -1197,6 +1197,7 @@ static void stringifyPreprocSetting(PreprocessorOptions& PPOpts,
CGOpts.UnrollLoops = 1;
CGOpts.VectorizeLoop = 1;
CGOpts.VectorizeSLP = 1;
CGOpts.DisableO0ImplyOptNone = 1; // Enable dynamic opt level switching.
CGOpts.setInlining((CGOpts.OptimizationLevel == 0)
? CodeGenOptions::OnlyAlwaysInlining