//===----------------------------------------------------------------------===//
/// This pass performs iterative function importing from other modules.
-Pass *createFunctionImportPass(FunctionInfoIndex *Index = nullptr);
+Pass *createFunctionImportPass(const FunctionInfoIndex *Index = nullptr);
//===----------------------------------------------------------------------===//
/// createFunctionInliningPass - Return a new pass object that uses a heuristic
class FunctionImportPass : public ModulePass {
/// Optional function summary index to use for importing, otherwise
/// the summary-file option must be specified.
- FunctionInfoIndex *Index;
+ const FunctionInfoIndex *Index;
public:
/// Pass identification, replacement for typeid
return "Function Importing";
}
- explicit FunctionImportPass(FunctionInfoIndex *Index = nullptr)
+ explicit FunctionImportPass(const FunctionInfoIndex *Index = nullptr)
: ModulePass(ID), Index(Index) {}
bool runOnModule(Module &M) override {
"Summary Based Function Import", false, false)
namespace llvm {
-Pass *createFunctionImportPass(FunctionInfoIndex *Index = nullptr) {
+Pass *createFunctionImportPass(const FunctionInfoIndex *Index = nullptr) {
return new FunctionImportPass(Index);
}
}