#include "llvm/System/Path.h"
#include <map>
#include <set>
-#include <fstream>
namespace llvm {
class MemoryBuffer;
/// @brief Create an empty Archive.
static Archive* CreateEmpty(
const sys::Path& Filename,///< Name of the archive to (eventually) create.
- LLVMContext* C ///< Context to use for global information
+ LLVMContext& C ///< Context to use for global information
);
/// Open an existing archive and load its contents in preparation for
/// @brief Open and load an archive file
static Archive* OpenAndLoad(
const sys::Path& filePath, ///< The file path to open and load
- LLVMContext* C, ///< The context to use for global information
+ LLVMContext& C, ///< The context to use for global information
std::string* ErrorMessage ///< An optional error string
);
/// @brief Open an existing archive and load its symbols.
static Archive* OpenAndLoadSymbols(
const sys::Path& Filename, ///< Name of the archive file to open
- LLVMContext* C, ///< The context to use for global info
+ LLVMContext& C, ///< The context to use for global info
std::string* ErrorMessage=0 ///< An optional error string
);
protected:
/// @brief Construct an Archive for \p filename and optionally map it
/// into memory.
- explicit Archive(const sys::Path& filename, LLVMContext* C);
+ explicit Archive(const sys::Path& filename, LLVMContext& C);
/// @param data The symbol table data to be parsed
/// @param len The length of the symbol table data
unsigned firstFileOffset; ///< Offset to first normal file.
ModuleMap modules; ///< The modules loaded via symbol lookup.
ArchiveMember* foreignST; ///< This holds the foreign symbol table.
- LLVMContext* Context; ///< This holds global data.
+ LLVMContext& Context; ///< This holds global data.
/// @}
/// @name Hidden
/// @{