Constify the Optnone checks in IR passes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202213 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Paul Robinson
2014-02-26 01:23:26 +00:00
parent 204755b283
commit cf84b5ba5e
4 changed files with 8 additions and 8 deletions

View File

@ -368,8 +368,8 @@ void LoopPass::assignPassManager(PMStack &PMS,
// Containing function has Attribute::OptimizeNone and transformation
// passes should skip it.
bool LoopPass::skipOptnoneFunction(Loop *L) const {
Function *F = L->getHeader()->getParent();
bool LoopPass::skipOptnoneFunction(const Loop *L) const {
const Function *F = L->getHeader()->getParent();
if (F && F->hasFnAttribute(Attribute::OptimizeNone)) {
// FIXME: Report this to dbgs() only once per function.
DEBUG(dbgs() << "Skipping pass '" << getPassName()