Ticket #49241: clang-optimization.patch

File clang-optimization.patch, 1.3 KB (added by howarth.at.macports@…, 9 years ago)

patch to avoid optimization errors in Apple Clang 6.0 or later

  • llvmCore/lib/CodeGen/MachineSSAUpdater.cpp

    old new  
    3838  return *static_cast<IncomingPredInfoTy*>(IPI);
    3939}
    4040
    41 
     41#pragma clang optimize off
    4242MachineSSAUpdater::MachineSSAUpdater(MachineFunction &MF,
    4343                                     SmallVectorImpl<MachineInstr*> *NewPHI)
    4444  : AV(0), IPI(0), InsertedPHIs(NewPHI) {
     
    5050  delete &getAvailableVals(AV);
    5151  delete &getIncomingPredInfo(IPI);
    5252}
     53#pragma clang optimize on
    5354
    5455/// Initialize - Reset this object to get ready for a new set of SSA
    5556/// updates.  ProtoValue is the value used to name PHI nodes.
  • llvmCore/lib/Transforms/Utils/SSAUpdater.cpp

    old new  
    3232  return *static_cast<IncomingPredInfoTy*>(IPI);
    3333}
    3434
    35 
     35#pragma clang optimize off
    3636SSAUpdater::SSAUpdater(SmallVectorImpl<PHINode*> *NewPHI)
    3737  : AV(0), PrototypeValue(0), IPI(0), InsertedPHIs(NewPHI) {}
    3838
     
    4040  delete &getAvailableVals(AV);
    4141  delete &getIncomingPredInfo(IPI);
    4242}
     43#pragma clang optimize on
    4344
    4445/// Initialize - Reset this object to get ready for a new set of SSA
    4546/// updates.  ProtoValue is the value used to name PHI nodes.