From 92c2eae4e15eeb75aa7bb697bd6d524d810e04de Mon Sep 17 00:00:00 2001 From: Rong Xu Date: Fri, 1 Apr 2016 20:15:04 +0000 Subject: [PATCH] Fix buildbot lldb-amd64-ninja-netbsd7 failure llvm-svn: 265180 --- llvm/include/llvm/ProfileData/InstrProf.h | 5 +---- llvm/lib/ProfileData/InstrProf.cpp | 4 ++++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/llvm/include/llvm/ProfileData/InstrProf.h b/llvm/include/llvm/ProfileData/InstrProf.h index e2bc706..bb4b1c7 100644 --- a/llvm/include/llvm/ProfileData/InstrProf.h +++ b/llvm/include/llvm/ProfileData/InstrProf.h @@ -19,7 +19,6 @@ #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/StringRef.h" #include "llvm/ADT/StringSet.h" -#include "llvm/IR/Function.h" #include "llvm/IR/GlobalValue.h" #include "llvm/IR/Metadata.h" #include "llvm/ProfileData/InstrProfData.inc" @@ -250,9 +249,7 @@ bool getValueProfDataFromInst(const Instruction &Inst, inline StringRef getPGOFuncNameMetadataName() { return "PGOFuncName"; } /// Return the PGOFuncName meta data associated with a function. -inline MDNode *getPGOFuncNameMetadata(const Function &F) { - return F.getMetadata(getPGOFuncNameMetadataName()); -} +MDNode *getPGOFuncNameMetadata(const Function &F); /// Create the PGOFuncName meta data if PGOFuncName is different from /// function's raw name. This should only apply to internal linkage functions diff --git a/llvm/lib/ProfileData/InstrProf.cpp b/llvm/lib/ProfileData/InstrProf.cpp index 618bceb..cd7ddaf 100644 --- a/llvm/lib/ProfileData/InstrProf.cpp +++ b/llvm/lib/ProfileData/InstrProf.cpp @@ -720,6 +720,10 @@ bool getValueProfDataFromInst(const Instruction &Inst, return true; } +MDNode *getPGOFuncNameMetadata(const Function &F) { + return F.getMetadata(getPGOFuncNameMetadataName()); +} + void createPGOFuncNameMetadata(Function &F) { const std::string &FuncName = getPGOFuncName(F); if (FuncName == F.getName()) -- 2.7.4