diff options
Diffstat (limited to 'llvm/include')
-rw-r--r-- | llvm/include/llvm/LTO/Config.h | 4 | ||||
-rw-r--r-- | llvm/include/llvm/LTO/LTO.h | 10 | ||||
-rw-r--r-- | llvm/include/llvm/LTO/LTOBackend.h | 3 |
3 files changed, 8 insertions, 9 deletions
diff --git a/llvm/include/llvm/LTO/Config.h b/llvm/include/llvm/LTO/Config.h index 41830f46912..2bda28558f6 100644 --- a/llvm/include/llvm/LTO/Config.h +++ b/llvm/include/llvm/LTO/Config.h @@ -84,7 +84,7 @@ struct Config { /// /// Note that in out-of-process backend scenarios, none of the hooks will be /// called for ThinLTO tasks. - typedef std::function<bool(size_t Task, Module &)> ModuleHookFn; + typedef std::function<bool(unsigned Task, Module &)> ModuleHookFn; /// This module hook is called after linking (regular LTO) or loading /// (ThinLTO) the module, before modifying it. @@ -191,7 +191,7 @@ struct Config { /// return a output stream to write the native object to. /// /// Stream callbacks must be thread safe. -typedef std::function<std::unique_ptr<raw_pwrite_stream>(size_t Task)> +typedef std::function<std::unique_ptr<raw_pwrite_stream>(unsigned Task)> AddStreamFn; /// A derived class of LLVMContext that initializes itself according to a given diff --git a/llvm/include/llvm/LTO/LTO.h b/llvm/include/llvm/LTO/LTO.h index 548edd88754..aa92bc8fd41 100644 --- a/llvm/include/llvm/LTO/LTO.h +++ b/llvm/include/llvm/LTO/LTO.h @@ -291,7 +291,7 @@ public: /// Returns an upper bound on the number of tasks that the client may expect. /// This may only be called after all IR object files have been added. For a /// full description of tasks see LTOBackend.h. - size_t getMaxTasks() const; + unsigned getMaxTasks() const; /// Runs the LTO pipeline. This function calls the supplied AddStream function /// to add native object files to the link. @@ -343,16 +343,16 @@ private: /// that we use partition 0 for all parallel LTO code generation partitions. /// Any partitioning of the combined LTO object is done internally by the /// LTO backend. - size_t Partition = Unknown; + unsigned Partition = Unknown; /// Special partition numbers. enum { /// A partition number has not yet been assigned to this global. - Unknown = -1ull, + Unknown = -1u, /// This global is either used by more than one partition or has an /// external reference, and therefore cannot be internalized. - External = -2ull, + External = -2u, }; }; @@ -364,7 +364,7 @@ private: void addSymbolToGlobalRes(object::IRObjectFile *Obj, SmallPtrSet<GlobalValue *, 8> &Used, const InputFile::Symbol &Sym, SymbolResolution Res, - size_t Partition); + unsigned Partition); Error addRegularLTO(std::unique_ptr<InputFile> Input, ArrayRef<SymbolResolution> Res); diff --git a/llvm/include/llvm/LTO/LTOBackend.h b/llvm/include/llvm/LTO/LTOBackend.h index fd7d063c81d..964884b9bae 100644 --- a/llvm/include/llvm/LTO/LTOBackend.h +++ b/llvm/include/llvm/LTO/LTOBackend.h @@ -39,12 +39,11 @@ Error backend(Config &C, AddStreamFn AddStream, std::unique_ptr<Module> M); /// Runs a ThinLTO backend. -Error thinBackend(Config &C, size_t Task, AddStreamFn AddStream, Module &M, +Error thinBackend(Config &C, unsigned Task, AddStreamFn AddStream, Module &M, ModuleSummaryIndex &CombinedIndex, const FunctionImporter::ImportMapTy &ImportList, const GVSummaryMapTy &DefinedGlobals, MapVector<StringRef, MemoryBufferRef> &ModuleMap); - } } |