summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenPGO.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2014-03-20 22:49:50 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2014-03-20 22:49:50 +0000
commit73f78627401201983e8110577290eeee9ae0cd6e (patch)
tree7e3fa06a6455e6a450d7c1db6bf4d28a12f081b5 /clang/lib/CodeGen/CodeGenPGO.cpp
parentdf1be1f4c5fd16cf97a2e73de2e1de676292989e (diff)
downloadbcm5719-llvm-73f78627401201983e8110577290eeee9ae0cd6e.tar.gz
bcm5719-llvm-73f78627401201983e8110577290eeee9ae0cd6e.zip
PGO: Rename FuncLinkage to VarLinkage; no functionality change
The variable is used to set the linkage for variables, and will become different from function linkage in a follow-up commit. <rdar://problem/15943240> llvm-svn: 204407
Diffstat (limited to 'clang/lib/CodeGen/CodeGenPGO.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenPGO.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CodeGenPGO.cpp b/clang/lib/CodeGen/CodeGenPGO.cpp
index 2dbe88cb277..0dfecfc36cd 100644
--- a/clang/lib/CodeGen/CodeGenPGO.cpp
+++ b/clang/lib/CodeGen/CodeGenPGO.cpp
@@ -238,7 +238,7 @@ llvm::GlobalVariable *CodeGenPGO::buildDataVar() {
auto *VarName = llvm::ConstantDataArray::getString(Ctx, getFuncName(),
false);
auto *Name = new llvm::GlobalVariable(CGM.getModule(), VarName->getType(),
- true, FuncLinkage, VarName,
+ true, VarLinkage, VarName,
getFuncVarName("name"));
Name->setSection(getNameSection(CGM));
Name->setAlignment(1);
@@ -260,7 +260,7 @@ llvm::GlobalVariable *CodeGenPGO::buildDataVar() {
llvm::ConstantExpr::getBitCast(RegionCounters, Int64PtrTy)
};
auto *Data =
- new llvm::GlobalVariable(CGM.getModule(), DataTy, true, FuncLinkage,
+ new llvm::GlobalVariable(CGM.getModule(), DataTy, true, VarLinkage,
llvm::ConstantStruct::get(DataTy, DataVals),
getFuncVarName("data"));
@@ -824,7 +824,7 @@ void CodeGenPGO::assignRegionCounters(const Decl *D, llvm::Function *Fn) {
if (!D)
return;
setFuncName(Fn);
- FuncLinkage = Fn->getLinkage();
+ VarLinkage = Fn->getLinkage();
mapRegionCounters(D);
if (InstrumentRegions)
emitCounterVariables();
@@ -882,7 +882,7 @@ void CodeGenPGO::emitCounterVariables() {
llvm::ArrayType *CounterTy = llvm::ArrayType::get(llvm::Type::getInt64Ty(Ctx),
NumRegionCounters);
RegionCounters =
- new llvm::GlobalVariable(CGM.getModule(), CounterTy, false, FuncLinkage,
+ new llvm::GlobalVariable(CGM.getModule(), CounterTy, false, VarLinkage,
llvm::Constant::getNullValue(CounterTy),
getFuncVarName("counters"));
RegionCounters->setAlignment(8);
OpenPOWER on IntegriCloud