Use empty() member functions when that's what's being tested for instead
of comparing begin() and end().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42585 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp
index e7abd47..88eeff7 100644
--- a/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/lib/CodeGen/LiveIntervalAnalysis.cpp
@@ -817,17 +817,15 @@
 
     MachineBasicBlock::iterator MI = MBB->begin(), miEnd = MBB->end();
 
-    if (MBB->livein_begin() != MBB->livein_end()) {
-      // Create intervals for live-ins to this BB first.
-      for (MachineBasicBlock::const_livein_iterator LI = MBB->livein_begin(),
-             LE = MBB->livein_end(); LI != LE; ++LI) {
-        handleLiveInRegister(MBB, MIIndex, getOrCreateInterval(*LI));
-        // Multiple live-ins can alias the same register.
-        for (const unsigned* AS = mri_->getSubRegisters(*LI); *AS; ++AS)
-          if (!hasInterval(*AS))
-            handleLiveInRegister(MBB, MIIndex, getOrCreateInterval(*AS),
-                                 true);
-      }
+    // Create intervals for live-ins to this BB first.
+    for (MachineBasicBlock::const_livein_iterator LI = MBB->livein_begin(),
+           LE = MBB->livein_end(); LI != LE; ++LI) {
+      handleLiveInRegister(MBB, MIIndex, getOrCreateInterval(*LI));
+      // Multiple live-ins can alias the same register.
+      for (const unsigned* AS = mri_->getSubRegisters(*LI); *AS; ++AS)
+        if (!hasInterval(*AS))
+          handleLiveInRegister(MBB, MIIndex, getOrCreateInterval(*AS),
+                               true);
     }
     
     for (; MI != miEnd; ++MI) {