[PATCH] D14912: Add findFunctionInfoList() accessor to FunctionInfoIndex.
Mehdi AMINI via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 22 20:04:05 PST 2015
joker.eph created this revision.
joker.eph added a reviewer: tejohnson.
joker.eph added a subscriber: llvm-commits.
This allows to query for a function in the map without creating an
entry, allowing to use a const FunctionInfoIndex.
http://reviews.llvm.org/D14912
Files:
include/llvm/IR/FunctionInfo.h
Index: include/llvm/IR/FunctionInfo.h
===================================================================
--- include/llvm/IR/FunctionInfo.h
+++ include/llvm/IR/FunctionInfo.h
@@ -194,6 +194,11 @@
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14912.40896.patch
Type: text/x-patch
Size: 654 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151123/e2963326/attachment-0001.bin>
More information about the llvm-commits
mailing list