Revert "Use empty() instead of size() == 0."

This reverts commit r194551 because it broke the buildbot.

llvm-svn: 194552
diff --git a/lld/lib/Core/Resolver.cpp b/lld/lib/Core/Resolver.cpp
index d5531c2..3af0c5c 100644
--- a/lld/lib/Core/Resolver.cpp
+++ b/lld/lib/Core/Resolver.cpp
@@ -227,7 +227,7 @@
   switch ( atom.sectionPosition() ) {
   case DefinedAtom::sectionPositionStart:
   case DefinedAtom::sectionPositionEnd:
-    assert(atom.empty());
+    assert(atom.size() == 0);
     break;
   case DefinedAtom::sectionPositionEarly:
   case DefinedAtom::sectionPositionAny:
diff --git a/lld/lib/Driver/InputGraph.cpp b/lld/lib/Driver/InputGraph.cpp
index 3f46461..be7fea0 100644
--- a/lld/lib/Driver/InputGraph.cpp
+++ b/lld/lib/Driver/InputGraph.cpp
@@ -133,7 +133,7 @@
 /// \brief Set the resolve state for the current element
 /// thats processed by the resolver.
 void ControlNode::setResolveState(uint32_t resolveState) {
-  if (_elements.empty())
+  if (_elements.size() == 0)
     return;
   _elements[_currentElementIndex]->setResolveState(resolveState);
 }
@@ -151,7 +151,7 @@
 /// of the input elements contained in the group.
 ErrorOr<File &> Group::getNextFile() {
   // If there are no elements, move on to the next input element
-  if (_elements.empty())
+  if (_elements.size() == 0)
     return make_error_code(InputGraphError::no_more_files);
 
   for (;;) {
diff --git a/lld/lib/Driver/WinLinkDriver.cpp b/lld/lib/Driver/WinLinkDriver.cpp
index 35cf6dd..9f692c1 100644
--- a/lld/lib/Driver/WinLinkDriver.cpp
+++ b/lld/lib/Driver/WinLinkDriver.cpp
@@ -911,7 +911,7 @@
     }
   }
 
-  if (inputElements.empty() && !isReadingDirectiveSection) {
+  if (inputElements.size() == 0 && !isReadingDirectiveSection) {
     diagnostics << "No input files\n";
     return false;
   }
diff --git a/lld/lib/ReaderWriter/ELF/SectionChunks.h b/lld/lib/ReaderWriter/ELF/SectionChunks.h
index 992db5c..0a0663b 100644
--- a/lld/lib/ReaderWriter/ELF/SectionChunks.h
+++ b/lld/lib/ReaderWriter/ELF/SectionChunks.h
@@ -576,7 +576,7 @@
 
 template <class ELFT> uint64_t StringTable<ELFT>::addString(StringRef symname) {
 
-  if (symname.empty())
+  if (symname.size() == 0)
     return 0;
   StringMapTIter stringIter = _stringMap.find(symname);
   if (stringIter == _stringMap.end()) {
diff --git a/lld/lib/ReaderWriter/MachO/StubsPass.hpp b/lld/lib/ReaderWriter/MachO/StubsPass.hpp
index 83afd7b..a478b9e 100644
--- a/lld/lib/ReaderWriter/MachO/StubsPass.hpp
+++ b/lld/lib/ReaderWriter/MachO/StubsPass.hpp
@@ -123,7 +123,7 @@
 
   virtual void addStubAtoms(MutableFile &mergedFile) {
     // Exit early if no stubs needed.
-    if (_targetToStub.empty())
+    if ( _targetToStub.size() == 0 )
       return;
     // Add all stubs to master file.
     for (auto it : _targetToStub) {
diff --git a/lld/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp b/lld/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp
index 40bf988..9d7bbca 100644
--- a/lld/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp
+++ b/lld/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp
@@ -666,7 +666,7 @@
       array = array.slice(3);
     }
 
-    if (array.empty())
+    if (array.size() == 0)
       return "";
 
     size_t len = 0;