-//===-- lib/Bytecode/ArchiveInternals.h -------------------------*- C++ -*-===//
+//===-- lib/Archive/ArchiveInternals.h -------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
-// This file was developed by Reid Spencer and is distributed under the
-// University of Illinois Open Source License. See LICENSE.TXT for details.
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
//
//===----------------------------------------------------------------------===//
-#ifndef LIB_BYTECODE_ARCHIVEINTERNALS_H
-#define LIB_BYTECODE_ARCHIVEINTERNALS_H
+#ifndef LIB_ARCHIVE_ARCHIVEINTERNALS_H
+#define LIB_ARCHIVE_ARCHIVEINTERNALS_H
-#include "llvm/Bytecode/Archive.h"
-#include "llvm/System/TimeValue.h"
#include "llvm/ADT/StringExtras.h"
+#include "llvm/Bitcode/Archive.h"
+#include "llvm/Support/TimeValue.h"
+#include <cstring>
#define ARFILE_MAGIC "!<arch>\n" ///< magic string
#define ARFILE_MAGIC_LEN (sizeof(ARFILE_MAGIC)-1) ///< length of magic string
namespace llvm {
- /// The ArchiveMemberHeader structure is used internally for bytecode
+ class LLVMContext;
+
+ /// The ArchiveMemberHeader structure is used internally for bitcode
/// archives.
/// The header precedes each file member in the archive. This structure is
/// defined using character arrays for direct and correct interpretation
fmag[1] = '\n';
}
- bool checkSignature() {
+ bool checkSignature() const {
return 0 == memcmp(fmag, ARFILE_MEMBER_MAGIC,2);
}
};
- // Get just the externally visible defined symbols from the bytecode
- bool GetBytecodeSymbols(const sys::Path& fName,
+ // Get just the externally visible defined symbols from the bitcode
+ bool GetBitcodeSymbols(const sys::Path& fName,
+ LLVMContext& Context,
std::vector<std::string>& symbols,
- BCDecompressor_t *BCDC, std::string* ErrMsg);
+ std::string* ErrMsg);
- ModuleProvider* GetBytecodeSymbols(const unsigned char*Buffer,unsigned Length,
- const std::string& ModuleID,
- std::vector<std::string>& symbols,
- BCDecompressor_t *BCDC,
- std::string* ErrMsg);
+ Module* GetBitcodeSymbols(const char *Buffer, unsigned Length,
+ const std::string& ModuleID,
+ LLVMContext& Context,
+ std::vector<std::string>& symbols,
+ std::string* ErrMsg);
}
#endif