[llvm] r184359 - Remove unused function.

Rafael Espindola rafael.espindola at gmail.com
Wed Jun 19 14:33:53 PDT 2013


Author: rafael
Date: Wed Jun 19 16:33:52 2013
New Revision: 184359

URL: http://llvm.org/viewvc/llvm-project?rev=184359&view=rev
Log:
Remove unused function.

Modified:
    llvm/trunk/tools/llvm-ar/Archive.cpp
    llvm/trunk/tools/llvm-ar/ArchiveInternals.h
    llvm/trunk/tools/llvm-ar/ArchiveWriter.cpp

Modified: llvm/trunk/tools/llvm-ar/Archive.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-ar/Archive.cpp?rev=184359&r1=184358&r2=184359&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-ar/Archive.cpp (original)
+++ llvm/trunk/tools/llvm-ar/Archive.cpp Wed Jun 19 16:33:52 2013
@@ -18,6 +18,7 @@
 #include "llvm/IR/Module.h"
 #include "llvm/Support/FileSystem.h"
 #include "llvm/Support/MemoryBuffer.h"
+#include "llvm/Support/PathV1.h"
 #include "llvm/Support/Process.h"
 #include "llvm/Support/system_error.h"
 #include <cstring>
@@ -210,30 +211,6 @@ static void getSymbols(Module*M, std::ve
   }
 }
 
-// Get just the externally visible defined symbols from the bitcode
-bool llvm::GetBitcodeSymbols(const sys::Path& fName,
-                             LLVMContext& Context,
-                             std::vector<std::string>& symbols,
-                             std::string* ErrMsg) {
-  OwningPtr<MemoryBuffer> Buffer;
-  if (error_code ec = MemoryBuffer::getFileOrSTDIN(fName.c_str(), Buffer)) {
-    if (ErrMsg) *ErrMsg = "Could not open file '" + fName.str() + "'" + ": "
-                        + ec.message();
-    return true;
-  }
-
-  Module *M = ParseBitcodeFile(Buffer.get(), Context, ErrMsg);
-  if (!M)
-    return true;
-
-  // Get the symbols
-  getSymbols(M, symbols);
-
-  // Done with the module.
-  delete M;
-  return true;
-}
-
 Module*
 llvm::GetBitcodeSymbols(const char *BufPtr, unsigned Length,
                         const std::string& ModuleID,

Modified: llvm/trunk/tools/llvm-ar/ArchiveInternals.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-ar/ArchiveInternals.h?rev=184359&r1=184358&r2=184359&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-ar/ArchiveInternals.h (original)
+++ llvm/trunk/tools/llvm-ar/ArchiveInternals.h Wed Jun 19 16:33:52 2013
@@ -16,7 +16,6 @@
 
 #include "Archive.h"
 #include "llvm/ADT/StringExtras.h"
-#include "llvm/Support/PathV1.h"
 #include "llvm/Support/TimeValue.h"
 #include <cstring>
 
@@ -69,13 +68,8 @@ namespace llvm {
       return 0 == memcmp(fmag, ARFILE_MEMBER_MAGIC,2);
     }
   };
-  
+
   // Get just the externally visible defined symbols from the bitcode
-  bool GetBitcodeSymbols(const sys::Path& fName,
-                          LLVMContext& Context,
-                          std::vector<std::string>& symbols,
-                          std::string* ErrMsg);
-  
   Module* GetBitcodeSymbols(const char *Buffer, unsigned Length,
                             const std::string& ModuleID,
                             LLVMContext& Context,

Modified: llvm/trunk/tools/llvm-ar/ArchiveWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-ar/ArchiveWriter.cpp?rev=184359&r1=184358&r2=184359&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-ar/ArchiveWriter.cpp (original)
+++ llvm/trunk/tools/llvm-ar/ArchiveWriter.cpp Wed Jun 19 16:33:52 2013
@@ -18,6 +18,7 @@
 #include "llvm/IR/Module.h"
 #include "llvm/Support/FileSystem.h"
 #include "llvm/Support/MemoryBuffer.h"
+#include "llvm/Support/PathV1.h"
 #include "llvm/Support/Process.h"
 #include "llvm/Support/Signals.h"
 #include "llvm/Support/system_error.h"





More information about the llvm-commits mailing list