mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 12:43:36 +01:00
[LTO] Migrate typedef to using
using has been used in several places in the file. Migrate the rest for consistency. llvm-svn: 359776
This commit is contained in:
parent
8cbafadfc6
commit
4ded17c871
@ -24,8 +24,8 @@ namespace lto {
|
||||
/// (e.g. in a cache).
|
||||
///
|
||||
/// Buffer callbacks must be thread safe.
|
||||
typedef std::function<void(unsigned Task, std::unique_ptr<MemoryBuffer> MB)>
|
||||
AddBufferFn;
|
||||
using AddBufferFn =
|
||||
std::function<void(unsigned Task, std::unique_ptr<MemoryBuffer> 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
|
||||
|
@ -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<bool(unsigned Task, const Module &)> ModuleHookFn;
|
||||
using ModuleHookFn = std::function<bool(unsigned Task, const Module &)>;
|
||||
|
||||
/// 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<bool(const ModuleSummaryIndex &Index)>
|
||||
CombinedIndexHookFn;
|
||||
using CombinedIndexHookFn =
|
||||
std::function<bool(const ModuleSummaryIndex &Index)>;
|
||||
CombinedIndexHookFn CombinedIndexHook;
|
||||
|
||||
/// This is a convenience function that configures this Config object to write
|
||||
|
@ -192,8 +192,8 @@ public:
|
||||
/// the fly.
|
||||
///
|
||||
/// Stream callbacks must be thread safe.
|
||||
typedef std::function<std::unique_ptr<NativeObjectStream>(unsigned Task)>
|
||||
AddStreamFn;
|
||||
using AddStreamFn =
|
||||
std::function<std::unique_ptr<NativeObjectStream>(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<std::unique_ptr<NativeObjectStream>(unsigned Task)>
|
||||
///
|
||||
/// if (AddStreamFn AddStream = Cache(Task, Key))
|
||||
/// ProduceContent(AddStream);
|
||||
typedef std::function<AddStreamFn(unsigned Task, StringRef Key)>
|
||||
NativeObjectCache;
|
||||
using NativeObjectCache =
|
||||
std::function<AddStreamFn(unsigned Task, StringRef Key)>;
|
||||
|
||||
/// 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<std::unique_ptr<ThinBackendProc>(
|
||||
using ThinBackend = std::function<std::unique_ptr<ThinBackendProc>(
|
||||
Config &C, ModuleSummaryIndex &CombinedIndex,
|
||||
StringMap<GVSummaryMapTy> &ModuleToDefinedGVSummaries,
|
||||
AddStreamFn AddStream, NativeObjectCache Cache)>
|
||||
ThinBackend;
|
||||
AddStreamFn AddStream, NativeObjectCache Cache)>;
|
||||
|
||||
/// This ThinBackend runs the individual backend jobs in-process.
|
||||
ThinBackend createInProcessThinBackend(unsigned ParallelismLevel);
|
||||
|
Loading…
Reference in New Issue
Block a user