diff options
| author | Mehdi Amini <mehdi.amini@apple.com> | 2015-11-24 06:07:42 +0000 |
|---|---|---|
| committer | Mehdi Amini <mehdi.amini@apple.com> | 2015-11-24 06:07:42 +0000 |
| commit | 1d704cdedf2daf05a8d3bbfa2c560686d175bcf9 (patch) | |
| tree | a73910a45df41ea72cfd7c32e48cf8566f3b8436 /llvm | |
| parent | bed60d35ed332f12a7c54eb16e59b69adb5d8c15 (diff) | |
| download | bcm5719-llvm-1d704cdedf2daf05a8d3bbfa2c560686d175bcf9.tar.gz bcm5719-llvm-1d704cdedf2daf05a8d3bbfa2c560686d175bcf9.zip | |
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 <mehdi.amini@apple.com>
llvm-svn: 253953
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/include/llvm/IR/FunctionInfo.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/include/llvm/IR/FunctionInfo.h b/llvm/include/llvm/IR/FunctionInfo.h index 3749212c9be..b8801693ab5 100644 --- a/llvm/include/llvm/IR/FunctionInfo.h +++ b/llvm/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<FunctionInfo> Info) { // Update the HasExportedFunctions flag, but only if we had a function |

