We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
StringRef
char *
1 parent 29abe6f commit cb0e24eCopy full SHA for cb0e24e
src/rustllvm/PassWrapper.cpp
@@ -529,10 +529,17 @@ LLVMRustPrintPasses() {
529
LLVMInitializePasses();
530
struct MyListener : PassRegistrationListener {
531
void passEnumerate(const PassInfo *info) {
532
+#if LLVM_VERSION_GE(4, 0)
533
+ if (!info->getPassArgument().empty()) {
534
+ printf("%15s - %s\n", info->getPassArgument().data(),
535
+ info->getPassName().data());
536
+ }
537
+#else
538
if (info->getPassArgument() && *info->getPassArgument()) {
539
printf("%15s - %s\n", info->getPassArgument(),
540
info->getPassName());
541
}
542
+#endif
543
544
} listener;
545
0 commit comments