-bool ReadArchiveFile(const std::string &Filename, std::vector<Module*> &Objects,
- std::string *ErrorStr) {
- int FD = open(Filename.c_str(), O_RDONLY);
- if (FD == -1)
- return Error(ErrorStr, "Error opening file!");
-
- // Stat the file to get its length...
- struct stat StatBuf;
- if (fstat(FD, &StatBuf) == -1 || StatBuf.st_size == 0)
- return Error(ErrorStr, "Error stat'ing file!");
-
+bool llvm::ReadArchiveFile(const std::string &Filename,
+ std::vector<Module*> &Objects,std::string *ErrorStr){
+ unsigned Length;
+