llvm.org GIT mirror llvm / 5d21e15
[LTO] Migrate typedef to using using has been used in several places in the file. Migrate the rest for consistency. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359776 91177308-0d34-0410-b5e6-96231b3b80d8 Fangrui Song 1 year, 5 months ago
3 changed file(s) with 11 addition(s) and 12 deletion(s). Raw diff Collapse all Expand all
2323 /// (e.g. in a cache).
2424 ///
2525 /// Buffer callbacks must be thread safe.
26 typedef std::function MB)>
27 AddBufferFn;
26 using AddBufferFn =
27 std::function MB)>;
2828
2929 /// Create a local file system cache which uses the given cache directory and
3030 /// file callback. This function also creates the cache directory if it does not
140140 ///
141141 /// Note that in out-of-process backend scenarios, none of the hooks will be
142142 /// called for ThinLTO tasks.
143 typedef std::function ModuleHookFn;
143 using ModuleHookFn = std::function;
144144
145145 /// This module hook is called after linking (regular LTO) or loading
146146 /// (ThinLTO) the module, before modifying it.
173173 ///
174174 /// It is called regardless of whether the backend is in-process, although it
175175 /// is not called from individual backend processes.
176 typedef std::function
177 CombinedIndexHookFn;
176 using CombinedIndexHookFn =
177 std::function;
178178 CombinedIndexHookFn CombinedIndexHook;
179179
180180 /// This is a convenience function that configures this Config object to write
191191 /// the fly.
192192 ///
193193 /// Stream callbacks must be thread safe.
194 typedef std::function(unsigned Task)>
195 AddStreamFn;
194 using AddStreamFn =
195 std::function(unsigned Task)>;
196196
197197 /// This is the type of a native object cache. To request an item from the
198198 /// cache, pass a unique string as the Key. For hits, the cached file will be
206206 ///
207207 /// if (AddStreamFn AddStream = Cache(Task, Key))
208208 /// ProduceContent(AddStream);
209 typedef std::function
210 NativeObjectCache;
209 using NativeObjectCache =
210 std::function;
211211
212212 /// A ThinBackend defines what happens after the thin-link phase during ThinLTO.
213213 /// The details of this type definition aren't important; clients can only
214214 /// create a ThinBackend using one of the create*ThinBackend() functions below.
215 typedef std::function(
215 using ThinBackend = std::function(
216216 Config &C, ModuleSummaryIndex &CombinedIndex,
217217 StringMap &ModuleToDefinedGVSummaries,
218 AddStreamFn AddStream, NativeObjectCache Cache)>
219 ThinBackend;
218 AddStreamFn AddStream, NativeObjectCache Cache)>;
220219
221220 /// This ThinBackend runs the individual backend jobs in-process.
222221 ThinBackend createInProcessThinBackend(unsigned ParallelismLevel);