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/Target/ARM/ARMAsmPrinter.cpp b/lib/Target/ARM/ARMAsmPrinter.cpp
index 38183c6..9435cc1 100644
--- a/lib/Target/ARM/ARMAsmPrinter.cpp
+++ b/lib/Target/ARM/ARMAsmPrinter.cpp
@@ -1001,7 +1001,7 @@
O << "\n";
// Output non-lazy-pointers for external and common global variables.
- if (GVNonLazyPtrs.begin() != GVNonLazyPtrs.end())
+ if (!GVNonLazyPtrs.empty())
SwitchToDataSection(".non_lazy_symbol_pointer", 0);
for (std::set<std::string>::iterator i = GVNonLazyPtrs.begin(),
e = GVNonLazyPtrs.end(); i != e; ++i) {
diff --git a/lib/Target/IA64/IA64AsmPrinter.cpp b/lib/Target/IA64/IA64AsmPrinter.cpp
index cb2cf62..08a27d4 100644
--- a/lib/Target/IA64/IA64AsmPrinter.cpp
+++ b/lib/Target/IA64/IA64AsmPrinter.cpp
@@ -147,7 +147,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';
}
diff --git a/lib/Target/PowerPC/PPCAsmPrinter.cpp b/lib/Target/PowerPC/PPCAsmPrinter.cpp
index b561c04..9ff41ca 100644
--- a/lib/Target/PowerPC/PPCAsmPrinter.cpp
+++ b/lib/Target/PowerPC/PPCAsmPrinter.cpp
@@ -1053,7 +1053,7 @@
O << "\n";
// Output stubs for external and common global variables.
- if (GVStubs.begin() != GVStubs.end()) {
+ if (!GVStubs.empty()) {
SwitchToDataSection(".non_lazy_symbol_pointer");
for (std::set<std::string>::iterator I = GVStubs.begin(),
E = GVStubs.end(); I != E; ++I) {
diff --git a/lib/Target/X86/X86ATTAsmPrinter.cpp b/lib/Target/X86/X86ATTAsmPrinter.cpp
index e53edff..8e52e00 100644
--- a/lib/Target/X86/X86ATTAsmPrinter.cpp
+++ b/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/lib/Target/X86/X86AsmPrinter.cpp b/lib/Target/X86/X86AsmPrinter.cpp
index c4d5958..7855e50 100644
--- a/lib/Target/X86/X86AsmPrinter.cpp
+++ b/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/lib/Target/X86/X86IntelAsmPrinter.cpp b/lib/Target/X86/X86IntelAsmPrinter.cpp
index 72ba1b0..bd8886c 100644
--- a/lib/Target/X86/X86IntelAsmPrinter.cpp
+++ b/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";
}