1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-24 13:33:37 +02:00
llvm-mirror/include/llvm/Transforms/Utils/NameAnonFunctions.h
Teresa Johnson 69629c2314 [PM] Port NameAnonFunction pass to new pass manager
Summary:
Port the NameAnonFunction pass and add a test.

Depends on D23439.

Reviewers: mehdi_amini

Subscribers: llvm-commits, mehdi_amini

Differential Revision: https://reviews.llvm.org/D23440

llvm-svn: 278509
2016-08-12 14:03:36 +00:00

32 lines
1009 B
C++

//===-- NameAnonFunctions.h - Anonymous Function Naming Pass ----*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file implements naming anonymous function to make sure they can be
// referred to by ThinLTO.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_TRANSFORMS_UTILS_NAMEANONFUNCTIONS_H
#define LLVM_TRANSFORMS_UTILS_NAMEANONFUNCTIONS_H
#include "llvm/IR/Module.h"
#include "llvm/IR/PassManager.h"
namespace llvm {
/// Simple pass that provides a name to every anonymous function.
class NameAnonFunctionPass : public PassInfoMixin<NameAnonFunctionPass> {
public:
NameAnonFunctionPass() {}
PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM);
};
}
#endif // LLVM_TRANSFORMS_UTILS_NAMEANONFUNCTIONS_H