aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
diff options
context:
space:
mode:
authorManuel Jacob <me@manueljacob.de>2016-01-16 20:30:46 +0000
committerManuel Jacob <me@manueljacob.de>2016-01-16 20:30:46 +0000
commit5f6eaac6115a44f4ef3d819123f8694d3d5825ea (patch)
tree4f2535126e469abb4e8af765dcd1692ec466424a /llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
parent7cdedc1e029ea5860f9077abb39013ae7cc6e9cf (diff)
downloadllvm-5f6eaac6115a44f4ef3d819123f8694d3d5825ea.zip
llvm-5f6eaac6115a44f4ef3d819123f8694d3d5825ea.tar.gz
llvm-5f6eaac6115a44f4ef3d819123f8694d3d5825ea.tar.bz2
GlobalValue: use getValueType() instead of getType()->getPointerElementType().
Reviewers: mjacob Subscribers: jholewinski, arsenm, dsanders, dblaikie Patch by Eduard Burtescu. Differential Revision: http://reviews.llvm.org/D16260 llvm-svn: 257999
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp')
-rw-r--r--llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp b/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
index fa939ae..d6fdf26 100644
--- a/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
+++ b/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
@@ -874,7 +874,7 @@ Function *GCOVProfiler::insertCounterWriteout(
GlobalVariable *GV = CountersBySP[j].first;
unsigned Arcs =
- cast<ArrayType>(GV->getType()->getElementType())->getNumElements();
+ cast<ArrayType>(GV->getValueType())->getNumElements();
Builder.CreateCall(EmitArcs, {Builder.getInt32(Arcs),
Builder.CreateConstGEP2_64(GV, 0, 0)});
}
@@ -966,7 +966,7 @@ insertFlush(ArrayRef<std::pair<GlobalVariable*, MDNode*> > CountersBySP) {
I = CountersBySP.begin(), E = CountersBySP.end();
I != E; ++I) {
GlobalVariable *GV = I->first;
- Constant *Null = Constant::getNullValue(GV->getType()->getElementType());
+ Constant *Null = Constant::getNullValue(GV->getValueType());
Builder.CreateStore(Null, GV);
}