From 2928c83b010f7cfdb0f819199d806f6942a7d995 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Fri, 6 Nov 2009 10:58:06 +0000 Subject: Pass StringRef by value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86251 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/PassAnalysisSupport.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/llvm/PassAnalysisSupport.h') diff --git a/include/llvm/PassAnalysisSupport.h b/include/llvm/PassAnalysisSupport.h index 690d080491..5864fad0d7 100644 --- a/include/llvm/PassAnalysisSupport.h +++ b/include/llvm/PassAnalysisSupport.h @@ -22,6 +22,7 @@ #include #include "llvm/Pass.h" #include "llvm/ADT/SmallVector.h" +#include "llvm/ADT/StringRef.h" namespace llvm { @@ -95,7 +96,7 @@ public: // 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); -- cgit v1.2.3