Print NewPM passes
-C passes=list was printing passes for the legacy pass manager. Use PassBuilder::printPassNames() to print NewPM passes instead.
This commit is contained in:
parent
45f694dbba
commit
655a810b66
1 changed files with 2 additions and 16 deletions
|
@ -987,22 +987,8 @@ LLVMRustPrintModule(LLVMModuleRef M, const char *Path, DemangleFn Demangle) {
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" void LLVMRustPrintPasses() {
|
extern "C" void LLVMRustPrintPasses() {
|
||||||
struct MyListener : PassRegistrationListener {
|
PassBuilder PB;
|
||||||
void passEnumerate(const PassInfo *Info) {
|
PB.printPassNames(outs());
|
||||||
StringRef PassArg = Info->getPassArgument();
|
|
||||||
StringRef PassName = Info->getPassName();
|
|
||||||
if (!PassArg.empty()) {
|
|
||||||
// These unsigned->signed casts could theoretically overflow, but
|
|
||||||
// realistically never will (and even if, the result is implementation
|
|
||||||
// defined rather plain UB).
|
|
||||||
printf("%15.*s - %.*s\n", (int)PassArg.size(), PassArg.data(),
|
|
||||||
(int)PassName.size(), PassName.data());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} Listener;
|
|
||||||
|
|
||||||
PassRegistry *PR = PassRegistry::getPassRegistry();
|
|
||||||
PR->enumerateWith(&Listener);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" void LLVMRustRunRestrictionPass(LLVMModuleRef M, char **Symbols,
|
extern "C" void LLVMRustRunRestrictionPass(LLVMModuleRef M, char **Symbols,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue