mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-05-13 17:37:00 +00:00

Currently we have a way to run a plugin if specified on the command line after the main action, and ways to unconditionally run the plugin before or after the main action, but no way to run a plugin if specified on the command line before the main action. This introduces the missing option. This is helpful because -clear-ast-before-backend clears the AST before codegen, while some plugins may want access to the AST. Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D112096
13 lines
587 B
C
13 lines
587 B
C
// REQUIRES: plugins, examples
|
|
|
|
// RUN: %clang_cc1 -load %llvmshlibdir/PluginsOrder%pluginext %s 2>&1 | FileCheck %s --check-prefix=ALWAYS
|
|
// ALWAYS: always-before
|
|
// ALWAYS-NEXT: always-after
|
|
|
|
// RUN: %clang_cc1 -load %llvmshlibdir/PluginsOrder%pluginext %s -add-plugin cmd-after -add-plugin cmd-before 2>&1 | FileCheck %s --check-prefix=ALL
|
|
// RUN: %clang_cc1 -load %llvmshlibdir/PluginsOrder%pluginext %s -add-plugin cmd-before -add-plugin cmd-after 2>&1 | FileCheck %s --check-prefix=ALL
|
|
// ALL: cmd-before
|
|
// ALL-NEXT: always-before
|
|
// ALL-NEXT: cmd-after
|
|
// ALL-NEXT: always-after
|