#define LLVM_PASS_ANALYSIS_SUPPORT_H
#include <vector>
+#include "llvm/Pass.h"
#include "llvm/ADT/SmallVector.h"
+#include "llvm/ADT/StringRef.h"
namespace llvm {
class StringRef;
-// No need to include Pass.h, we are being included by it!
-
//===----------------------------------------------------------------------===//
// AnalysisUsage - Represent the analysis usage information of a pass. This
// tracks analyses that the pass REQUIRES (must be available when the pass
// This can be useful when a pass is trivially preserved, but may not be
// linked in. Be careful about spelling!
//
- AnalysisUsage &addPreserved(const StringRef &Arg) {
+ AnalysisUsage &addPreserved(StringRef Arg) {
const PassInfo *PI = Pass::lookupPassInfo(Arg);
// If the pass exists, preserve it. Otherwise silently do nothing.
if (PI) Preserved.push_back(PI);