Fix a build warning of unhandled enum in switch

Summary: LLVM adds a new value FMRB_DoesNotReadMemory in the enumeration.

Reviewers: andrew.w.kaylor, chrisj, zinob, grosser, jdoerfert

Subscribers: Meinersbur, pollydev

Differential Revision: http://reviews.llvm.org/D22109

llvm-svn: 275085
This commit is contained in:
Weiming Zhao 2016-07-11 18:27:52 +00:00
parent 63c4ce8e1b
commit 7614e178cb
2 changed files with 4 additions and 0 deletions

View File

@ -311,6 +311,8 @@ bool ScopBuilder::buildAccessCallInst(MemAccInst Inst, Loop *L) {
llvm_unreachable("Unknown mod ref behaviour cannot be represented."); llvm_unreachable("Unknown mod ref behaviour cannot be represented.");
case llvm::FMRB_DoesNotAccessMemory: case llvm::FMRB_DoesNotAccessMemory:
return true; return true;
case llvm::FMRB_DoesNotReadMemory:
return false;
case llvm::FMRB_OnlyReadsMemory: case llvm::FMRB_OnlyReadsMemory:
GlobalReads.push_back(CI); GlobalReads.push_back(CI);
return true; return true;

View File

@ -536,6 +536,8 @@ bool ScopDetection::isValidCallInst(CallInst &CI,
Context.AST.add(&CI); Context.AST.add(&CI);
return true; return true;
case FMRB_DoesNotReadMemory:
return false;
} }
} }