leonardchan added a comment.

> I mean, I'm happy for the patch to be reverted, but I still really don't 
> understand why this fixes the test to work *exactly* the same as w/ the old 
> pass manager and doesn't break any other tests if it is completely wrong? It 
> seems like there must be something strange with the test coverage if this is 
> so far off of correct without any failures...
> 
> I also don't understand what fix you are suggesting instead, but maybe you 
> can show a patch?

This is also the fix I'm suggesting.

  diff --git a/clang/lib/CodeGen/BackendUtil.cpp 
b/clang/lib/CodeGen/BackendUtil.cpp
  index 5d66473e7b9..f924ecbd8c6 100644
  --- a/clang/lib/CodeGen/BackendUtil.cpp
  +++ b/clang/lib/CodeGen/BackendUtil.cpp
  @@ -1220,12 +1220,13 @@ void 
EmitAssemblyHelper::EmitAssemblyWithNewPassManager(
         }
       }
   
  -    if (CodeGenOpts.OptimizationLevel == 0)
  +    if (CodeGenOpts.OptimizationLevel == 0) {
         addSanitizersAtO0(MPM, TargetTriple, LangOpts, CodeGenOpts);
   
  -    if (CodeGenOpts.hasProfileIRInstr()) {
  -      // This file is stored as the ProfileFile.
  -      MPM.addPass(PGOInstrumentationGenCreateVar(PGOOpt->ProfileFile));
  +      if (CodeGenOpts.hasProfileIRInstr()) {
  +        // This file is stored as the ProfileFile.
  +        MPM.addPass(PGOInstrumentationGenCreateVar(PGOOpt->ProfileFile));
  +      }
       }
     }


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63155/new/

https://reviews.llvm.org/D63155



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to