summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
diff options
context:
space:
mode:
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 fa939aee252..d6fdf26ab76 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);
}
OpenPOWER on IntegriCloud