From ce1164be37e60f44057303fbf7ac02167012eba5 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Wed, 19 Jun 2013 21:33:52 +0000 Subject: Remove unused function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184359 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/llvm-ar/Archive.cpp | 25 +------------------------ tools/llvm-ar/ArchiveInternals.h | 8 +------- tools/llvm-ar/ArchiveWriter.cpp | 1 + 3 files changed, 3 insertions(+), 31 deletions(-) (limited to 'tools') diff --git a/tools/llvm-ar/Archive.cpp b/tools/llvm-ar/Archive.cpp index c733652e58..dcb640198e 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 @@ -210,30 +211,6 @@ static void getSymbols(Module*M, std::vector& symbols) { } } -// Get just the externally visible defined symbols from the bitcode -bool llvm::GetBitcodeSymbols(const sys::Path& fName, - LLVMContext& Context, - std::vector& symbols, - std::string* ErrMsg) { - OwningPtr 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, diff --git a/tools/llvm-ar/ArchiveInternals.h b/tools/llvm-ar/ArchiveInternals.h index 7b73312a8f..a39c76bb47 100644 --- a/tools/llvm-ar/ArchiveInternals.h +++ b/tools/llvm-ar/ArchiveInternals.h @@ -16,7 +16,6 @@ #include "Archive.h" #include "llvm/ADT/StringExtras.h" -#include "llvm/Support/PathV1.h" #include "llvm/Support/TimeValue.h" #include @@ -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& symbols, - std::string* ErrMsg); - Module* GetBitcodeSymbols(const char *Buffer, unsigned Length, const std::string& ModuleID, LLVMContext& Context, diff --git a/tools/llvm-ar/ArchiveWriter.cpp b/tools/llvm-ar/ArchiveWriter.cpp index 5b74b26110..ada45f510b 100644 --- a/tools/llvm-ar/ArchiveWriter.cpp +++ b/tools/llvm-ar/ArchiveWriter.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/Signals.h" #include "llvm/Support/system_error.h" -- cgit v1.2.3