
This patch implements a simple Pass Registry class, which takes ownership of the passes registered with it and provides an interface to get the pass pointer by its name.
21 lines
605 B
C++
21 lines
605 B
C++
//===- Pass.cpp - Passes that operate on Sandbox IR -----------------------===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "llvm/SandboxIR/Pass.h"
|
|
#include "llvm/SandboxIR/PassManager.h"
|
|
#include "llvm/Support/Debug.h"
|
|
|
|
using namespace llvm::sandboxir;
|
|
|
|
#ifndef NDEBUG
|
|
void Pass::dump() const {
|
|
print(dbgs());
|
|
dbgs() << "\n";
|
|
}
|
|
#endif // NDEBUG
|