From: Mehdi Amini Date: Tue, 24 Nov 2015 06:07:42 +0000 (+0000) Subject: Add findFunctionInfoList() accessor to FunctionInfoIndex. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4857f32de4fa88a5025dd982d48f2e367c4afe88;p=oota-llvm.git Add findFunctionInfoList() accessor to FunctionInfoIndex. Summary: This allows to query for a function in the map without creating an entry, allowing to use a const FunctionInfoIndex. Reviewers: tejohnson Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D14912 From: Mehdi Amini git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253953 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/IR/FunctionInfo.h b/include/llvm/IR/FunctionInfo.h index 3749212c9be..b8801693ab5 100644 --- a/include/llvm/IR/FunctionInfo.h +++ b/include/llvm/IR/FunctionInfo.h @@ -194,6 +194,11 @@ public: return FunctionMap[FuncName]; } + /// Get the list of function info objects for a given function. + const const_funcinfo_iterator findFunctionInfoList(StringRef FuncName) const { + return FunctionMap.find(FuncName); + } + /// Add a function info for a function of the given name. void addFunctionInfo(StringRef FuncName, std::unique_ptr Info) { // Update the HasExportedFunctions flag, but only if we had a function