summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenPGO.h
diff options
context:
space:
mode:
authorJustin Bogner <mail@justinbogner.com>2014-12-02 23:15:30 +0000
committerJustin Bogner <mail@justinbogner.com>2014-12-02 23:15:30 +0000
commit111c6533c202234a9085326fc237c03f7ca6f54f (patch)
tree667296e2d885063cd9c432983d3da82e0185cfcd /clang/lib/CodeGen/CodeGenPGO.h
parentec7ebebe558d42924784dc290d35284864d0088a (diff)
downloadbcm5719-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.h7
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.
OpenPOWER on IntegriCloud