For PR998:
[oota-llvm.git] / lib / Linker / LinkItems.cpp
index aaa87dcb37779399eed876fef2a89dfacb8f227d..22e661440576ca32fe4e4bf9a915e1a826185fd8 100644 (file)
@@ -32,10 +32,10 @@ Linker::LinkInItems(const ItemList& Items, ItemList& NativeItems) {
        I != E; ++I) {
     if (I->second) {
       // Link in the library suggested.
-      bool is_file = true;
-      if (LinkInLibrary(I->first,is_file))
+      bool is_bytecode = true;
+      if (LinkInLibrary(I->first,is_bytecode))
         return true;
-      if (!is_file)
+      if (!is_bytecode)
         NativeItems.push_back(*I);
     } else {
       // Link in the file suggested
@@ -61,8 +61,8 @@ Linker::LinkInItems(const ItemList& Items, ItemList& NativeItems) {
 
 /// LinkInLibrary - links one library into the HeadModule.
 ///
-bool Linker::LinkInLibrary(const std::string& Lib, bool& is_file) {
-  is_file = false;
+bool Linker::LinkInLibrary(const std::string& Lib, bool& is_bytecode) {
+  is_bytecode = false;
   // Determine where this library lives.
   sys::Path Pathname = FindLib(Lib);
   if (Pathname.isEmpty())
@@ -77,11 +77,12 @@ bool Linker::LinkInLibrary(const std::string& Lib, bool& is_file) {
       // LLVM ".so" file.
       if (LinkInFile(Pathname))
         return error("Cannot link file '" + Pathname.toString() + "'");
-      is_file = true;
+      is_bytecode = true;
       break;
     case sys::ArchiveFileType:
       if (LinkInArchive(Pathname))
         return error("Cannot link archive '" + Pathname.toString() + "'");
+      is_bytecode = true;
       break;
     default:
       return warning("Supposed library '" + Lib + "' isn't a library.");