diff --git a/llvm/include/llvm/LTO/Caching.h b/llvm/include/llvm/LTO/Caching.h index c20d81920833..4c4a708d24e9 100644 --- a/llvm/include/llvm/LTO/Caching.h +++ b/llvm/include/llvm/LTO/Caching.h @@ -24,8 +24,8 @@ namespace lto { /// (e.g. in a cache). /// /// Buffer callbacks must be thread safe. -typedef std::function MB)> - AddBufferFn; +using AddBufferFn = + std::function MB)>; /// Create a local file system cache which uses the given cache directory and /// file callback. This function also creates the cache directory if it does not diff --git a/llvm/include/llvm/LTO/Config.h b/llvm/include/llvm/LTO/Config.h index 1e2eeab11c0a..6db722d21337 100644 --- a/llvm/include/llvm/LTO/Config.h +++ b/llvm/include/llvm/LTO/Config.h @@ -141,7 +141,7 @@ struct Config { /// /// Note that in out-of-process backend scenarios, none of the hooks will be /// called for ThinLTO tasks. - typedef std::function ModuleHookFn; + using ModuleHookFn = std::function; /// This module hook is called after linking (regular LTO) or loading /// (ThinLTO) the module, before modifying it. @@ -174,8 +174,8 @@ struct Config { /// /// It is called regardless of whether the backend is in-process, although it /// is not called from individual backend processes. - typedef std::function - CombinedIndexHookFn; + using CombinedIndexHookFn = + std::function; CombinedIndexHookFn CombinedIndexHook; /// This is a convenience function that configures this Config object to write diff --git a/llvm/include/llvm/LTO/LTO.h b/llvm/include/llvm/LTO/LTO.h index 8fcf1075721c..489561e8c82b 100644 --- a/llvm/include/llvm/LTO/LTO.h +++ b/llvm/include/llvm/LTO/LTO.h @@ -192,8 +192,8 @@ public: /// the fly. /// /// Stream callbacks must be thread safe. -typedef std::function(unsigned Task)> - AddStreamFn; +using AddStreamFn = + std::function(unsigned Task)>; /// This is the type of a native object cache. To request an item from the /// cache, pass a unique string as the Key. For hits, the cached file will be @@ -207,17 +207,16 @@ typedef std::function(unsigned Task)> /// /// if (AddStreamFn AddStream = Cache(Task, Key)) /// ProduceContent(AddStream); -typedef std::function - NativeObjectCache; +using NativeObjectCache = + std::function; /// A ThinBackend defines what happens after the thin-link phase during ThinLTO. /// The details of this type definition aren't important; clients can only /// create a ThinBackend using one of the create*ThinBackend() functions below. -typedef std::function( +using ThinBackend = std::function( Config &C, ModuleSummaryIndex &CombinedIndex, StringMap &ModuleToDefinedGVSummaries, - AddStreamFn AddStream, NativeObjectCache Cache)> - ThinBackend; + AddStreamFn AddStream, NativeObjectCache Cache)>; /// This ThinBackend runs the individual backend jobs in-process. ThinBackend createInProcessThinBackend(unsigned ParallelismLevel);