forked from OSchip/llvm-project
[IR] Add LLVM_READONLY to BasicBlock::getTerminator.
I noticed that this function got called twice in compiled code to create succ_begin and succ_end iterators. Adding this directive helps the compiler share the call. Ideally we'd just make this method available for inlining since its quite simple, but the current header file arrangements don't allow that. llvm-svn: 292754
This commit is contained in:
parent
6f8e989b21
commit
eb3067ee85
|
@ -111,7 +111,7 @@ public:
|
|||
|
||||
/// \brief Returns the terminator instruction if the block is well formed or
|
||||
/// null if the block is not well formed.
|
||||
TerminatorInst *getTerminator();
|
||||
TerminatorInst *getTerminator() LLVM_READONLY;
|
||||
const TerminatorInst *getTerminator() const {
|
||||
return const_cast<BasicBlock *>(this)->getTerminator();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue