diff options
Diffstat (limited to 'contrib/llvm/include/llvm/LTO/legacy/LTOModule.h')
-rw-r--r-- | contrib/llvm/include/llvm/LTO/legacy/LTOModule.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/contrib/llvm/include/llvm/LTO/legacy/LTOModule.h b/contrib/llvm/include/llvm/LTO/legacy/LTOModule.h index 017e223ed8a6..84b9b8c02942 100644 --- a/contrib/llvm/include/llvm/LTO/legacy/LTOModule.h +++ b/contrib/llvm/include/llvm/LTO/legacy/LTOModule.h @@ -1,9 +1,8 @@ //===-LTOModule.h - LLVM Link Time Optimizer ------------------------------===// // -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // @@ -18,6 +17,7 @@ #include "llvm/ADT/StringMap.h" #include "llvm/ADT/StringSet.h" #include "llvm/IR/Module.h" +#include "llvm/LTO/LTO.h" #include "llvm/Object/IRObjectFile.h" #include "llvm/Object/ModuleSymbolTable.h" #include "llvm/Target/TargetMachine.h" @@ -48,6 +48,8 @@ private: std::string LinkerOpts; + std::string DependentLibraries; + std::unique_ptr<Module> Mod; MemoryBufferRef MBRef; ModuleSymbolTable SymTab; @@ -156,9 +158,17 @@ public: const std::vector<StringRef> &getAsmUndefinedRefs() { return _asm_undefines; } + static lto::InputFile *createInputFile(const void *buffer, size_t buffer_size, + const char *path, std::string &out_error); + + static size_t getDependentLibraryCount(lto::InputFile *input); + + static const char *getDependentLibrary(lto::InputFile *input, size_t index, size_t *size); + private: /// Parse metadata from the module // FIXME: it only parses "llvm.linker.options" metadata at the moment + // FIXME: can't access metadata in lazily loaded modules void parseMetadata(); /// Parse the symbols from the module and model-level ASM and add them to |