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

llvm-svn: 42585
diff --git a/llvm/lib/Target/X86/X86ATTAsmPrinter.cpp b/llvm/lib/Target/X86/X86ATTAsmPrinter.cpp
index e53edff..8e52e00 100644
--- a/llvm/lib/Target/X86/X86ATTAsmPrinter.cpp
+++ b/llvm/lib/Target/X86/X86ATTAsmPrinter.cpp
@@ -168,7 +168,7 @@
   for (MachineFunction::const_iterator I = MF.begin(), E = MF.end();
        I != E; ++I) {
     // Print a label for the basic block.
-    if (I->pred_begin() != I->pred_end()) {
+    if (!I->pred_empty()) {
       printBasicBlockLabel(I, true);
       O << '\n';
     }
diff --git a/llvm/lib/Target/X86/X86AsmPrinter.cpp b/llvm/lib/Target/X86/X86AsmPrinter.cpp
index c4d5958..7855e50 100644
--- a/llvm/lib/Target/X86/X86AsmPrinter.cpp
+++ b/llvm/lib/Target/X86/X86AsmPrinter.cpp
@@ -316,7 +316,7 @@
   }
   
   // Output linker support code for dllexported globals
-  if (DLLExportedGVs.begin() != DLLExportedGVs.end()) {
+  if (!DLLExportedGVs.empty()) {
     SwitchToDataSection(".section .drectve");
   }
 
@@ -326,7 +326,7 @@
     O << "\t.ascii \" -export:" << *i << ",data\"\n";
   }    
 
-  if (DLLExportedFns.begin() != DLLExportedFns.end()) {
+  if (!DLLExportedFns.empty()) {
     SwitchToDataSection(".section .drectve");
   }
 
@@ -362,7 +362,7 @@
     }
 
     // Output stubs for external and common global variables.
-    if (GVStubs.begin() != GVStubs.end())
+    if (!GVStubs.empty())
       SwitchToDataSection(
                     ".section __IMPORT,__pointers,non_lazy_symbol_pointers");
     for (std::set<std::string>::iterator i = GVStubs.begin(), e = GVStubs.end();
diff --git a/llvm/lib/Target/X86/X86IntelAsmPrinter.cpp b/llvm/lib/Target/X86/X86IntelAsmPrinter.cpp
index 72ba1b0..bd8886c 100644
--- a/llvm/lib/Target/X86/X86IntelAsmPrinter.cpp
+++ b/llvm/lib/Target/X86/X86IntelAsmPrinter.cpp
@@ -77,7 +77,7 @@
   for (MachineFunction::const_iterator I = MF.begin(), E = MF.end();
        I != E; ++I) {
     // Print a label for the basic block if there are any predecessors.
-    if (I->pred_begin() != I->pred_end()) {
+    if (!I->pred_empty()) {
       printBasicBlockLabel(I, true);
       O << '\n';
     }
@@ -412,8 +412,8 @@
   }
 
     // Output linker support code for dllexported globals
-  if ((DLLExportedGVs.begin() != DLLExportedGVs.end()) ||
-      (DLLExportedFns.begin() != DLLExportedFns.end())) {
+  if (!DLLExportedGVs.empty() ||
+      !DLLExportedFns.empty()) {
     SwitchToDataSection("");
     O << "; WARNING: The following code is valid only with MASM v8.x and (possible) higher\n"
       << "; This version of MASM is usually shipped with Microsoft Visual Studio 2005\n"
@@ -434,8 +434,8 @@
     O << "\t db ' /EXPORT:" << *i << "'\n";
   }    
 
-  if ((DLLExportedGVs.begin() != DLLExportedGVs.end()) ||
-      (DLLExportedFns.begin() != DLLExportedFns.end())) {
+  if (!DLLExportedGVs.empty() ||
+      !DLLExportedFns.empty()) {
     O << "_drectve\t ends\n";    
   }