diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-06-19 21:33:52 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-06-19 21:33:52 +0000 |
commit | ce1164be37e60f44057303fbf7ac02167012eba5 (patch) | |
tree | 2ae324e5ab401687dfc1293d6f52ae06b8fc0259 /tools/llvm-ar/Archive.cpp | |
parent | 4df4bccc71ea0477836db9a417d3da202c2baa09 (diff) | |
download | external_llvm-ce1164be37e60f44057303fbf7ac02167012eba5.zip external_llvm-ce1164be37e60f44057303fbf7ac02167012eba5.tar.gz external_llvm-ce1164be37e60f44057303fbf7ac02167012eba5.tar.bz2 |
Remove unused function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184359 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-ar/Archive.cpp')
-rw-r--r-- | tools/llvm-ar/Archive.cpp | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/tools/llvm-ar/Archive.cpp b/tools/llvm-ar/Archive.cpp index c733652..dcb6401 100644 --- a/tools/llvm-ar/Archive.cpp +++ b/tools/llvm-ar/Archive.cpp @@ -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, |