* finegrainify namespacification of ArchiveReader.cpp

* Refactor reader stuff out of include/llvm/Bytecode/Primitives.h.  This is
  internal implementation details for the reader, not public interfaces!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10739 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2004-01-10 19:00:15 +00:00
parent 4443019b7d
commit 3446ae8337
5 changed files with 164 additions and 19 deletions

View File

@ -22,8 +22,7 @@
#include "Config/sys/mman.h"
#include "Config/fcntl.h"
#include <cstdlib>
namespace llvm {
using namespace llvm;
namespace {
struct ar_hdr {
@ -162,8 +161,8 @@ static bool ReadArchiveBuffer(const std::string &ArchiveName,
// true on error, or false on success. This does not support reading files from
// standard input.
//
bool ReadArchiveFile(const std::string &Filename, std::vector<Module*> &Objects,
std::string *ErrorStr) {
bool llvm::ReadArchiveFile(const std::string &Filename,
std::vector<Module*> &Objects,std::string *ErrorStr){
int Length = getFileSize(Filename);
if (Length == -1)
return Error(ErrorStr, "Error getting file length!");
@ -192,5 +191,3 @@ bool ReadArchiveFile(const std::string &Filename, std::vector<Module*> &Objects,
return Result;
}
} // End llvm namespace