diff options
Diffstat (limited to 'llvm/lib/ProfileData/InstrProf.cpp')
-rw-r--r-- | llvm/lib/ProfileData/InstrProf.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/ProfileData/InstrProf.cpp b/llvm/lib/ProfileData/InstrProf.cpp index f856c25789e..8482b18f1e0 100644 --- a/llvm/lib/ProfileData/InstrProf.cpp +++ b/llvm/lib/ProfileData/InstrProf.cpp @@ -165,6 +165,13 @@ GlobalVariable *createPGOFuncNameVar(Function &F, StringRef FuncName) { return createPGOFuncNameVar(*F.getParent(), F.getLinkage(), FuncName); } +void InstrProfSymtab::create(const Module &M) { + for (const Function &F : M) + addFuncName(getPGOFuncName(F)); + + finalizeSymtab(); +} + int collectPGOFuncNameStrings(const std::vector<std::string> &NameStrs, bool doCompression, std::string &Result) { uint8_t Header[16], *P = Header; |