diff --git a/llvm/test/BugPoint/attr-crash.ll b/llvm/test/BugPoint/attr-crash.ll --- a/llvm/test/BugPoint/attr-crash.ll +++ b/llvm/test/BugPoint/attr-crash.ll @@ -1,4 +1,4 @@ -; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crashfuncattr 2>&1 | FileCheck %s +; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%pluginext %s -output-prefix %t -bugpoint-crashfuncattr 2>&1 | FileCheck %s ; REQUIRES: plugins ; ; ModuleID = 'attr-crash.ll' diff --git a/llvm/test/BugPoint/compile-custom.ll b/llvm/test/BugPoint/compile-custom.ll --- a/llvm/test/BugPoint/compile-custom.ll +++ b/llvm/test/BugPoint/compile-custom.ll @@ -1,4 +1,4 @@ -; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext --compile-custom --compile-command="%python %/s.py arg1 arg2" --output-prefix %t %s | FileCheck %s +; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%pluginext --compile-custom --compile-command="%python %/s.py arg1 arg2" --output-prefix %t %s | FileCheck %s ; REQUIRES: plugins ; Test that arguments are correctly passed in --compile-command. The output diff --git a/llvm/test/BugPoint/crash-narrowfunctiontest.ll b/llvm/test/BugPoint/crash-narrowfunctiontest.ll --- a/llvm/test/BugPoint/crash-narrowfunctiontest.ll +++ b/llvm/test/BugPoint/crash-narrowfunctiontest.ll @@ -1,6 +1,6 @@ ; Test that bugpoint can narrow down the testcase to the important function ; -; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crashcalls -silence-passes > /dev/null +; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%pluginext %s -output-prefix %t -bugpoint-crashcalls -silence-passes > /dev/null ; REQUIRES: plugins define i32 @foo() { ret i32 1 } diff --git a/llvm/test/BugPoint/func-attrs-keyval.ll b/llvm/test/BugPoint/func-attrs-keyval.ll --- a/llvm/test/BugPoint/func-attrs-keyval.ll +++ b/llvm/test/BugPoint/func-attrs-keyval.ll @@ -1,4 +1,4 @@ -; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crashfuncattr -silence-passes +; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%pluginext %s -output-prefix %t -bugpoint-crashfuncattr -silence-passes ; RUN: llvm-dis %t-reduced-simplified.bc -o - | FileCheck %s ; REQUIRES: plugins diff --git a/llvm/test/BugPoint/func-attrs.ll b/llvm/test/BugPoint/func-attrs.ll --- a/llvm/test/BugPoint/func-attrs.ll +++ b/llvm/test/BugPoint/func-attrs.ll @@ -1,6 +1,6 @@ -; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crashfuncattr -silence-passes +; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%pluginext %s -output-prefix %t -bugpoint-crashfuncattr -silence-passes ; RUN: llvm-dis %t-reduced-simplified.bc -o - | FileCheck -check-prefixes=ALL,ENABLED %s -; RUN: bugpoint -disable-attribute-remove -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crashfuncattr -silence-passes +; RUN: bugpoint -disable-attribute-remove -load %llvmshlibdir/BugpointPasses%pluginext %s -output-prefix %t -bugpoint-crashfuncattr -silence-passes ; RUN: llvm-dis %t-reduced-simplified.bc -o - | FileCheck -check-prefixes=ALL,DISABLED %s ; REQUIRES: plugins diff --git a/llvm/test/BugPoint/invalid-debuginfo.ll b/llvm/test/BugPoint/invalid-debuginfo.ll --- a/llvm/test/BugPoint/invalid-debuginfo.ll +++ b/llvm/test/BugPoint/invalid-debuginfo.ll @@ -1,4 +1,4 @@ -; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crash-too-many-cus -silence-passes 2>&1 | FileCheck %s +; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%pluginext %s -output-prefix %t -bugpoint-crash-too-many-cus -silence-passes 2>&1 | FileCheck %s ; REQUIRES: plugins ; CHECK: DICompileUnit not listed in llvm.dbg.cu diff --git a/llvm/test/BugPoint/metadata.ll b/llvm/test/BugPoint/metadata.ll --- a/llvm/test/BugPoint/metadata.ll +++ b/llvm/test/BugPoint/metadata.ll @@ -1,11 +1,11 @@ ; REQUIRES: plugins -; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crashcalls -silence-passes -disable-namedmd-remove -disable-strip-debuginfo -disable-strip-debug-types > /dev/null +; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%pluginext %s -output-prefix %t -bugpoint-crashcalls -silence-passes -disable-namedmd-remove -disable-strip-debuginfo -disable-strip-debug-types > /dev/null ; RUN: llvm-dis %t-reduced-simplified.bc -o - | FileCheck %s ; -; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t-nodebug -bugpoint-crashcalls -silence-passes -disable-namedmd-remove > /dev/null +; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%pluginext %s -output-prefix %t-nodebug -bugpoint-crashcalls -silence-passes -disable-namedmd-remove > /dev/null ; RUN: llvm-dis %t-nodebug-reduced-simplified.bc -o - | FileCheck %s --check-prefix=NODEBUG ; -; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t-notype -bugpoint-crashcalls -silence-passes -disable-namedmd-remove -disable-strip-debuginfo > /dev/null +; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%pluginext %s -output-prefix %t-notype -bugpoint-crashcalls -silence-passes -disable-namedmd-remove -disable-strip-debuginfo > /dev/null ; RUN: llvm-dis %t-notype-reduced-simplified.bc -o - | FileCheck %s --check-prefix=NOTYPE ; ; Bugpoint can drop the metadata on the call, as it does not contrinute to the crash. diff --git a/llvm/test/BugPoint/named-md.ll b/llvm/test/BugPoint/named-md.ll --- a/llvm/test/BugPoint/named-md.ll +++ b/llvm/test/BugPoint/named-md.ll @@ -1,6 +1,6 @@ -; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crash-too-many-cus -silence-passes -disable-strip-debuginfo > /dev/null +; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%pluginext %s -output-prefix %t -bugpoint-crash-too-many-cus -silence-passes -disable-strip-debuginfo > /dev/null ; RUN: llvm-dis %t-reduced-simplified.bc -o - | FileCheck %s -; RUN-DISABLE: bugpoint -disable-namedmd-remove -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crash-too-many-cus -silence-passes > /dev/null +; RUN-DISABLE: bugpoint -disable-namedmd-remove -load %llvmshlibdir/BugpointPasses%pluginext %s -output-prefix %t -bugpoint-crash-too-many-cus -silence-passes > /dev/null ; RUN-DISABLE: llvm-dis %t-reduced-simplified.bc -o - | FileCheck %s ; REQUIRES: plugins diff --git a/llvm/test/BugPoint/remove_arguments_test.ll b/llvm/test/BugPoint/remove_arguments_test.ll --- a/llvm/test/BugPoint/remove_arguments_test.ll +++ b/llvm/test/BugPoint/remove_arguments_test.ll @@ -1,4 +1,4 @@ -; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crashcalls -silence-passes +; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%pluginext %s -output-prefix %t -bugpoint-crashcalls -silence-passes ; RUN: llvm-dis %t-reduced-simplified.bc -o - | FileCheck %s ; REQUIRES: plugins diff --git a/llvm/test/BugPoint/replace-funcs-with-null.ll b/llvm/test/BugPoint/replace-funcs-with-null.ll --- a/llvm/test/BugPoint/replace-funcs-with-null.ll +++ b/llvm/test/BugPoint/replace-funcs-with-null.ll @@ -1,6 +1,6 @@ ; Test that bugpoint can reduce the set of functions by replacing them with null. ; -; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -replace-funcs-with-null -bugpoint-crash-decl-funcs -silence-passes -safe-run-llc +; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%pluginext %s -output-prefix %t -replace-funcs-with-null -bugpoint-crash-decl-funcs -silence-passes -safe-run-llc ; REQUIRES: plugins @foo2 = alias i32 (), i32 ()* @foo diff --git a/llvm/test/BugPoint/retain-crashing-metadata.ll b/llvm/test/BugPoint/retain-crashing-metadata.ll --- a/llvm/test/BugPoint/retain-crashing-metadata.ll +++ b/llvm/test/BugPoint/retain-crashing-metadata.ll @@ -1,5 +1,5 @@ ; REQUIRES: plugins -; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t-notype -bugpoint-crashmetadata -silence-passes > /dev/null +; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%pluginext %s -output-prefix %t-notype -bugpoint-crashmetadata -silence-passes > /dev/null ; RUN: llvm-dis %t-notype-reduced-simplified.bc -o - | FileCheck %s ; ; Make sure BugPoint retains metadata contributing to a crash. diff --git a/llvm/test/BugPoint/unsymbolized.ll b/llvm/test/BugPoint/unsymbolized.ll --- a/llvm/test/BugPoint/unsymbolized.ll +++ b/llvm/test/BugPoint/unsymbolized.ll @@ -2,9 +2,9 @@ ; RUN: echo "import sys" > %t.py ; RUN: echo "print('args = ' + str(sys.argv))" >> %t.py ; RUN: echo "exit(1)" >> %t.py -; RUN: not bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crashcalls -opt-command=%python -opt-args %t.py | FileCheck %s -; RUN: not --crash opt -enable-new-pm=0 -load %llvmshlibdir/BugpointPasses%shlibext %s -bugpoint-crashcalls -disable-symbolication 2>&1 | FileCheck --check-prefix=CRASH %s -; RUN: not bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crashcalls -opt-command=%t.non.existent.opt.binary -opt-args %t.py 2>&1 | FileCheck %s --check-prefix=BAD-OPT +; RUN: not bugpoint -load %llvmshlibdir/BugpointPasses%pluginext %s -output-prefix %t -bugpoint-crashcalls -opt-command=%python -opt-args %t.py | FileCheck %s +; RUN: not --crash opt -enable-new-pm=0 -load %llvmshlibdir/BugpointPasses%pluginext %s -bugpoint-crashcalls -disable-symbolication 2>&1 | FileCheck --check-prefix=CRASH %s +; RUN: not bugpoint -load %llvmshlibdir/BugpointPasses%pluginext %s -output-prefix %t -bugpoint-crashcalls -opt-command=%t.non.existent.opt.binary -opt-args %t.py 2>&1 | FileCheck %s --check-prefix=BAD-OPT ; Test that bugpoint disables symbolication on the opt tool to reduce runtime overhead when opt crashes ; CHECK: args = {{.*}}'-disable-symbolication' diff --git a/llvm/test/lit.cfg.py b/llvm/test/lit.cfg.py --- a/llvm/test/lit.cfg.py +++ b/llvm/test/lit.cfg.py @@ -88,6 +88,7 @@ # Add site-specific substitutions. config.substitutions.append(('%llvmshlibdir', config.llvm_shlib_dir)) config.substitutions.append(('%shlibext', config.llvm_shlib_ext)) +config.substitutions.append(('%pluginext', config.llvm_plugin_ext)) config.substitutions.append(('%exeext', config.llvm_exe_ext)) diff --git a/llvm/test/lit.site.cfg.py.in b/llvm/test/lit.site.cfg.py.in --- a/llvm/test/lit.site.cfg.py.in +++ b/llvm/test/lit.site.cfg.py.in @@ -10,6 +10,7 @@ config.llvm_lib_dir = path(r"@LLVM_LIBS_DIR@") config.llvm_shlib_dir = path(r"@SHLIBDIR@") config.llvm_shlib_ext = "@SHLIBEXT@" +config.llvm_plugin_ext = "@LLVM_PLUGIN_EXT@" config.llvm_exe_ext = "@EXEEXT@" config.lit_tools_dir = path(r"@LLVM_LIT_TOOLS_DIR@") config.errc_messages = "@LLVM_LIT_ERRC_MESSAGES@" diff --git a/llvm/unittests/Passes/PluginsTest.cpp b/llvm/unittests/Passes/PluginsTest.cpp --- a/llvm/unittests/Passes/PluginsTest.cpp +++ b/llvm/unittests/Passes/PluginsTest.cpp @@ -33,7 +33,7 @@ void *Ptr = (void *)(intptr_t)anchor; std::string Path = sys::fs::getMainExecutable(Argv0, Ptr); llvm::SmallString<256> Buf{sys::path::parent_path(Path)}; - sys::path::append(Buf, (Name + LTDL_SHLIB_EXT).c_str()); + sys::path::append(Buf, (Name + LLVM_PLUGIN_EXT).c_str()); return std::string(Buf.str()); }