diff options
author | Justin Bogner <mail@justinbogner.com> | 2014-12-02 23:15:30 +0000 |
---|---|---|
committer | Justin Bogner <mail@justinbogner.com> | 2014-12-02 23:15:30 +0000 |
commit | 111c6533c202234a9085326fc237c03f7ca6f54f (patch) | |
tree | 667296e2d885063cd9c432983d3da82e0185cfcd /clang/lib/CodeGen/CodeGenPGO.h | |
parent | ec7ebebe558d42924784dc290d35284864d0088a (diff) | |
download | bcm5719-llvm-111c6533c202234a9085326fc237c03f7ca6f54f.tar.gz bcm5719-llvm-111c6533c202234a9085326fc237c03f7ca6f54f.zip |
InstrProf: Use the same names for variables as we use in the profile
There's no need to use different names for the local variables than we
use in the profile itself, and it's a bit simpler and easier to debug
if we're consistent.
llvm-svn: 223173
Diffstat (limited to 'clang/lib/CodeGen/CodeGenPGO.h')
-rw-r--r-- | clang/lib/CodeGen/CodeGenPGO.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CodeGenPGO.h b/clang/lib/CodeGen/CodeGenPGO.h index 3a2deae31da..57bde0fd818 100644 --- a/clang/lib/CodeGen/CodeGenPGO.h +++ b/clang/lib/CodeGen/CodeGenPGO.h @@ -31,8 +31,7 @@ class RegionCounter; class CodeGenPGO { private: CodeGenModule &CGM; - std::string PrefixedFuncName; - StringRef RawFuncName; + std::string FuncName; llvm::GlobalValue::LinkageTypes VarLinkage; unsigned NumRegionCounters; @@ -60,9 +59,9 @@ public: /// Get the string used to identify this function in the profile data. /// For functions with local linkage, this includes the main file name. - StringRef getFuncName() const { return StringRef(PrefixedFuncName); } + StringRef getFuncName() const { return StringRef(FuncName); } std::string getFuncVarName(StringRef VarName) const { - return ("__llvm_profile_" + VarName + "_" + RawFuncName).str(); + return ("__llvm_profile_" + VarName + "_" + FuncName).str(); } /// Return the counter value of the current region. |