[Mesa-dev] [PATCH v2] clover: Use Legacy PassManager for LLVM trunk (3.7)
Matt Turner
mattst88 at gmail.com
Fri Feb 13 18:02:09 PST 2015
On Fri, Feb 13, 2015 at 5:49 PM, Shawn Starr <shawn.starr at rogers.com> wrote:
> From: Shawn Starr <shawn.starr at rogers.com>
>
> Use the LegacyPassManager for now.
>
> v2: Not #ifdef, should be #if
>
> Signed-off-by: Shawn Starr <shawn.starr at rogers.com>
> ---
> src/gallium/state_trackers/clover/llvm/invocation.cpp | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp
> b/src/gallium/state_trackers/clover/llvm/invocation.cpp
> index 0794e61..3c2ca49 100644
> --- a/src/gallium/state_trackers/clover/llvm/invocation.cpp
> +++ b/src/gallium/state_trackers/clover/llvm/invocation.cpp
> @@ -44,7 +44,11 @@
> #if HAVE_LLVM < 0x0305
> #include <llvm/ADT/OwningPtr.h>
> #endif
> +#if HAVE_LLVM >= 0x0307
> +#include <llvm/IR/LegacyPassManager.h>
> +#else
> #include <llvm/PassManager.h>
> +#endif
> #include <llvm/Support/CodeGen.h>
> #include <llvm/Support/TargetSelect.h>
> #include <llvm/Support/MemoryBuffer.h>
> @@ -298,7 +302,12 @@ namespace {
> optimize(llvm::Module *mod, unsigned optimization_level,
> const std::vector<llvm::Function *> &kernels) {
>
> - llvm::PassManager PM;
> +#if HAVE_LLVM >= 0x0307
> + llvm::legacy::PassManager PM;
> +#else
> + llvm:PassManager PM;
No, I meant
llvm:PassManager PM;
should be
llvm::PassManager PM;
More information about the mesa-dev
mailing list