Remove unused function.
authorRafael Espindola <rafael.espindola@gmail.com>
Wed, 19 Jun 2013 21:33:52 +0000 (21:33 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Wed, 19 Jun 2013 21:33:52 +0000 (21:33 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184359 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvm-ar/Archive.cpp
tools/llvm-ar/ArchiveInternals.h
tools/llvm-ar/ArchiveWriter.cpp

index c733652e58ab7aa00b9502cc9fcc4cadbb8007bf..dcb640198eefb215800a9a75c01a5227570811fe 100644 (file)
@@ -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::vector<std::string>& symbols) {
   }
 }
 
-// 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,
index 7b73312a8faf962dfdbac71636963033f85b82f5..a39c76bb471652ae5da77d8c71a3e4ff229cfc82 100644 (file)
@@ -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,
index 5b74b26110263e4218281d964cdd7da15d3151a7..ada45f510ba732e775b43024a94593b27d7994db 100644 (file)
@@ -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"