Fix for Revision 261498

This commit is contained in:
Andrey Shishpanov
2016-02-23 17:35:26 +03:00
parent 5862c9e6a5
commit b4aa685d52

View File

@@ -3343,7 +3343,11 @@ void CWriter::printFunction(llvm::Function &F) {
// print the basic blocks
for (llvm::Function::iterator BB = F.begin(), E = F.end(); BB != E; ++BB) {
if (llvm::Loop *L = LI->getLoopFor(&*BB)) {
#if ISPC_LLVM_VERSION >= ISPC_LLVM_3_9 // LLVM 3.9+
if (L->getHeader()->getIterator() == BB && L->getParentLoop() == 0)
#else
if (L->getHeader() == BB && L->getParentLoop() == 0)
#endif
printLoop(L);
} else {
printBasicBlock(&*BB);