Do s/_context/_ctx/ to Resolver.cpp.

llvm-svn: 230814
diff --git a/lld/lib/Core/Resolver.cpp b/lld/lib/Core/Resolver.cpp
index 656a039..7153279 100644
--- a/lld/lib/Core/Resolver.cpp
+++ b/lld/lib/Core/Resolver.cpp
@@ -73,12 +73,12 @@
 bool Resolver::handleArchiveFile(const File &file) {
   const ArchiveLibraryFile *archiveFile = cast<ArchiveLibraryFile>(&file);
   bool searchForOverrides =
-      _context.searchArchivesToOverrideTentativeDefinitions();
+      _ctx.searchArchivesToOverrideTentativeDefinitions();
   bool undefAdded = false;
   forEachUndefines(searchForOverrides,
                    [&](StringRef undefName, bool dataSymbolOnly) {
     if (const File *member = archiveFile->find(undefName, dataSymbolOnly)) {
-      member->setOrdinal(_context.getNextOrdinalAndIncrement());
+      member->setOrdinal(_ctx.getNextOrdinalAndIncrement());
       const_cast<File *>(member)->beforeLink();
       undefAdded = handleFile(*member) || undefAdded;
     }
@@ -91,7 +91,7 @@
   const SharedLibraryFile *sharedLibrary = cast<SharedLibraryFile>(&file);
   handleFile(*sharedLibrary);
   bool searchForOverrides =
-      _context.searchSharedLibrariesToOverrideTentativeDefinitions();
+      _ctx.searchSharedLibrariesToOverrideTentativeDefinitions();
   forEachUndefines(searchForOverrides,
                    [&](StringRef undefName, bool dataSymbolOnly) {
     if (const SharedLibraryAtom *atom =
@@ -131,7 +131,7 @@
 
   if (!isFirstTime) {
     // If duplicate symbols are allowed, select the first group.
-    if (_context.getAllowDuplicates())
+    if (_ctx.getAllowDuplicates())
       return;
     auto *prevGroup = dyn_cast<DefinedAtom>(_symbolTable.findGroup(atom.name()));
     assert(prevGroup &&
@@ -188,7 +188,7 @@
   }
 
   // An atom that should never be dead-stripped is a dead-strip root.
-  if (_context.deadStrip() && atom.deadStrip() == DefinedAtom::deadStripNever) {
+  if (_ctx.deadStrip() && atom.deadStrip() == DefinedAtom::deadStripNever) {
     _deadStripRoots.insert(&atom);
   }
 }
@@ -233,7 +233,7 @@
 // Returns true if at least one of N previous files has created an
 // undefined symbol.
 bool Resolver::undefinesAdded(int begin, int end) {
-  std::vector<std::unique_ptr<Node>> &inputs = _context.getNodes();
+  std::vector<std::unique_ptr<Node>> &inputs = _ctx.getNodes();
   for (int i = begin; i < end; ++i)
     if (FileNode *node = dyn_cast<FileNode>(inputs[i].get()))
       if (_newUndefinesAdded[node->getFile()])
@@ -242,7 +242,7 @@
 }
 
 File *Resolver::getFile(int &index) {
-  std::vector<std::unique_ptr<Node>> &inputs = _context.getNodes();
+  std::vector<std::unique_ptr<Node>> &inputs = _ctx.getNodes();
   if ((size_t)index >= inputs.size())
     return nullptr;
   if (GroupEnd *group = dyn_cast<GroupEnd>(inputs[index].get())) {
@@ -262,7 +262,7 @@
 
 // Make a map of Symbol -> ArchiveFile.
 void Resolver::makePreloadArchiveMap() {
-  std::vector<std::unique_ptr<Node>> &nodes = _context.getNodes();
+  std::vector<std::unique_ptr<Node>> &nodes = _ctx.getNodes();
   for (int i = nodes.size() - 1; i >= 0; --i)
     if (auto *fnode = dyn_cast<FileNode>(nodes[i].get()))
       if (auto *archive = dyn_cast<ArchiveLibraryFile>(fnode->getFile()))
@@ -270,7 +270,7 @@
           _archiveMap[sym] = archive;
 }
 
-// Keep adding atoms until _context.getNextFile() returns an error. This
+// Keep adding atoms until _ctx.getNextFile() returns an error. This
 // function is where undefined atoms are resolved.
 bool Resolver::resolveUndefines() {
   ScopedTask task(getDefaultDomain(), "resolveUndefines");
@@ -296,17 +296,17 @@
         break;
       seen.insert(file);
       assert(!file->hasOrdinal());
-      file->setOrdinal(_context.getNextOrdinalAndIncrement());
+      file->setOrdinal(_ctx.getNextOrdinalAndIncrement());
       undefAdded = handleFile(*file);
       break;
     case File::kindArchiveLibrary:
       if (!file->hasOrdinal())
-        file->setOrdinal(_context.getNextOrdinalAndIncrement());
+        file->setOrdinal(_ctx.getNextOrdinalAndIncrement());
       undefAdded = handleArchiveFile(*file);
       break;
     case File::kindSharedLibrary:
       if (!file->hasOrdinal())
-        file->setOrdinal(_context.getNextOrdinalAndIncrement());
+        file->setOrdinal(_ctx.getNextOrdinalAndIncrement());
       handleSharedLibrary(*file);
       break;
     }
@@ -365,7 +365,7 @@
 void Resolver::deadStripOptimize() {
   ScopedTask task(getDefaultDomain(), "deadStripOptimize");
   // only do this optimization with -dead_strip
-  if (!_context.deadStrip())
+  if (!_ctx.deadStrip())
     return;
 
   // Some type of references prevent referring atoms to be dead-striped.
@@ -382,14 +382,14 @@
   }
 
   // By default, shared libraries are built with all globals as dead strip roots
-  if (_context.globalsAreDeadStripRoots())
+  if (_ctx.globalsAreDeadStripRoots())
     for (const Atom *atom : _atoms)
       if (const DefinedAtom *defAtom = dyn_cast<DefinedAtom>(atom))
         if (defAtom->scope() == DefinedAtom::scopeGlobal)
           _deadStripRoots.insert(defAtom);
 
   // Or, use list of names that are dead strip roots.
-  for (const StringRef &name : _context.deadStripRoots()) {
+  for (const StringRef &name : _ctx.deadStripRoots()) {
     const Atom *symAtom = _symbolTable.findByName(name);
     assert(symAtom);
     _deadStripRoots.insert(symAtom);
@@ -410,7 +410,7 @@
 bool Resolver::checkUndefines() {
   // build vector of remaining undefined symbols
   std::vector<const UndefinedAtom *> undefinedAtoms = _symbolTable.undefines();
-  if (_context.deadStrip()) {
+  if (_ctx.deadStrip()) {
     // When dead code stripping, we don't care if dead atoms are undefined.
     undefinedAtoms.erase(
         std::remove_if(undefinedAtoms.begin(), undefinedAtoms.end(),
@@ -429,8 +429,7 @@
 
       // If this is a library and undefined symbols are allowed on the
       // target platform, skip over it.
-      if (isa<SharedLibraryFile>(undef->file()) &&
-          _context.allowShlibUndefines())
+      if (isa<SharedLibraryFile>(undef->file()) && _ctx.allowShlibUndefines())
         continue;
 
       // If the undefine is coalesced away, skip over it.
@@ -439,14 +438,14 @@
 
       // Seems like this symbol is undefined. Warn that.
       foundUndefines = true;
-      if (_context.printRemainingUndefines()) {
+      if (_ctx.printRemainingUndefines()) {
         llvm::errs() << "Undefined symbol: " << undef->file().path()
-                     << ": " << _context.demangle(undef->name())
+                     << ": " << _ctx.demangle(undef->name())
                      << "\n";
       }
     }
     if (foundUndefines) {
-      if (_context.printRemainingUndefines())
+      if (_ctx.printRemainingUndefines())
         llvm::errs() << "symbol(s) not found\n";
       return true;
     }
@@ -470,7 +469,7 @@
   updateReferences();
   deadStripOptimize();
   if (checkUndefines())
-    if (!_context.allowRemainingUndefines())
+    if (!_ctx.allowRemainingUndefines())
       return false;
   removeCoalescedAwayAtoms();
   _result->addAtoms(_atoms);