diff options
Diffstat (limited to 'include/llvm/Object/IRSymtab.h')
-rw-r--r-- | include/llvm/Object/IRSymtab.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/include/llvm/Object/IRSymtab.h b/include/llvm/Object/IRSymtab.h index b425543bf637..5b832141a865 100644 --- a/include/llvm/Object/IRSymtab.h +++ b/include/llvm/Object/IRSymtab.h @@ -25,8 +25,8 @@ #define LLVM_OBJECT_IRSYMTAB_H #include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/iterator_range.h" #include "llvm/ADT/StringRef.h" +#include "llvm/ADT/iterator_range.h" #include "llvm/IR/GlobalValue.h" #include "llvm/Object/SymbolicFile.h" #include "llvm/Support/Endian.h" @@ -36,6 +36,9 @@ #include <vector> namespace llvm { + +struct BitcodeFileContents; + namespace irsymtab { namespace storage { @@ -314,6 +317,16 @@ inline Reader::symbol_range Reader::module_symbols(unsigned I) const { SymbolRef(MEnd, MEnd, nullptr, this)}; } +/// The contents of the irsymtab in a bitcode file. Any underlying data for the +/// irsymtab are owned by Symtab and Strtab. +struct FileContents { + SmallVector<char, 0> Symtab, Strtab; + Reader TheReader; +}; + +/// Reads the contents of a bitcode file, creating its irsymtab if necessary. +Expected<FileContents> readBitcode(const BitcodeFileContents &BFC); + } // end namespace irsymtab } // end namespace llvm |