From f7591dd31f9a03df907554053067c7c5b7c4b3dc Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Tue, 4 Mar 2014 12:32:42 +0000 Subject: [PATCH] [Modules] Move the PassNameParser to the IR library as it deals in the PassInfo structures of the legacy pass manager. Also give it the Legacy prefix as it is not a particularly widely used header. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202839 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../PassNameParser.h => IR/LegacyPassNameParser.h} | 9 ++++++--- lib/IR/LegacyPassManager.cpp | 2 +- lib/IR/Pass.cpp | 2 +- tools/bugpoint/bugpoint.cpp | 2 +- tools/llvm-stress/llvm-stress.cpp | 2 +- tools/opt/opt.cpp | 2 +- 6 files changed, 11 insertions(+), 8 deletions(-) rename include/llvm/{Support/PassNameParser.h => IR/LegacyPassNameParser.h} (95%) diff --git a/include/llvm/Support/PassNameParser.h b/include/llvm/IR/LegacyPassNameParser.h similarity index 95% rename from include/llvm/Support/PassNameParser.h rename to include/llvm/IR/LegacyPassNameParser.h index c0914b1f2f0..b9c1d8b45c8 100644 --- a/include/llvm/Support/PassNameParser.h +++ b/include/llvm/IR/LegacyPassNameParser.h @@ -1,4 +1,4 @@ -//===- llvm/Support/PassNameParser.h ----------------------------*- C++ -*-===// +//===- LegacyPassNameParser.h -----------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -18,10 +18,13 @@ // includes passes that have a PassType that are compatible with the filter // (which is the template argument). // +// Note that this is part of the legacy pass manager infrastructure and will be +// (eventually) going away. +// //===----------------------------------------------------------------------===// -#ifndef LLVM_SUPPORT_PASSNAMEPARSER_H -#define LLVM_SUPPORT_PASSNAMEPARSER_H +#ifndef LLVM_IR_LEGACYPASSNAMEPARSER_H +#define LLVM_IR_LEGACYPASSNAMEPARSER_H #include "llvm/ADT/STLExtras.h" #include "llvm/Pass.h" diff --git a/lib/IR/LegacyPassManager.cpp b/lib/IR/LegacyPassManager.cpp index a0ed6cab387..e384e084571 100644 --- a/lib/IR/LegacyPassManager.cpp +++ b/lib/IR/LegacyPassManager.cpp @@ -15,13 +15,13 @@ #include "llvm/IR/IRPrintingPasses.h" #include "llvm/IR/LegacyPassManager.h" #include "llvm/IR/LegacyPassManagers.h" +#include "llvm/IR/LegacyPassNameParser.h" #include "llvm/IR/Module.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/Debug.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/ManagedStatic.h" #include "llvm/Support/Mutex.h" -#include "llvm/Support/PassNameParser.h" #include "llvm/Support/Timer.h" #include "llvm/Support/raw_ostream.h" #include diff --git a/lib/IR/Pass.cpp b/lib/IR/Pass.cpp index f81a1c77a8f..06a5e9e378b 100644 --- a/lib/IR/Pass.cpp +++ b/lib/IR/Pass.cpp @@ -16,9 +16,9 @@ #include "llvm/Pass.h" #include "llvm/IR/Function.h" #include "llvm/IR/IRPrintingPasses.h" +#include "llvm/IR/LegacyPassNameParser.h" #include "llvm/PassRegistry.h" #include "llvm/Support/Debug.h" -#include "llvm/Support/PassNameParser.h" #include "llvm/Support/raw_ostream.h" using namespace llvm; diff --git a/tools/bugpoint/bugpoint.cpp b/tools/bugpoint/bugpoint.cpp index b2023e937a2..f664a07a990 100644 --- a/tools/bugpoint/bugpoint.cpp +++ b/tools/bugpoint/bugpoint.cpp @@ -16,12 +16,12 @@ #include "BugDriver.h" #include "ToolRunner.h" #include "llvm/IR/LLVMContext.h" +#include "llvm/IR/LegacyPassNameParser.h" #include "llvm/LinkAllIR.h" #include "llvm/LinkAllPasses.h" #include "llvm/PassManager.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/ManagedStatic.h" -#include "llvm/Support/PassNameParser.h" #include "llvm/Support/PluginLoader.h" #include "llvm/Support/PrettyStackTrace.h" #include "llvm/Support/Process.h" diff --git a/tools/llvm-stress/llvm-stress.cpp b/tools/llvm-stress/llvm-stress.cpp index beb0a6042d2..d31b86f56bd 100644 --- a/tools/llvm-stress/llvm-stress.cpp +++ b/tools/llvm-stress/llvm-stress.cpp @@ -17,12 +17,12 @@ #include "llvm/IR/IRPrintingPasses.h" #include "llvm/IR/Instruction.h" #include "llvm/IR/LLVMContext.h" +#include "llvm/IR/LegacyPassNameParser.h" #include "llvm/IR/Module.h" #include "llvm/IR/Verifier.h" #include "llvm/PassManager.h" #include "llvm/Support/Debug.h" #include "llvm/Support/ManagedStatic.h" -#include "llvm/Support/PassNameParser.h" #include "llvm/Support/PluginLoader.h" #include "llvm/Support/PrettyStackTrace.h" #include "llvm/Support/ToolOutputFile.h" diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp index e32ec963369..1501bde219c 100644 --- a/tools/opt/opt.cpp +++ b/tools/opt/opt.cpp @@ -25,6 +25,7 @@ #include "llvm/IR/DataLayout.h" #include "llvm/IR/IRPrintingPasses.h" #include "llvm/IR/LLVMContext.h" +#include "llvm/IR/LegacyPassNameParser.h" #include "llvm/IR/Module.h" #include "llvm/IR/Verifier.h" #include "llvm/IRReader/IRReader.h" @@ -35,7 +36,6 @@ #include "llvm/PassManager.h" #include "llvm/Support/Debug.h" #include "llvm/Support/ManagedStatic.h" -#include "llvm/Support/PassNameParser.h" #include "llvm/Support/PluginLoader.h" #include "llvm/Support/PrettyStackTrace.h" #include "llvm/Support/Signals.h"