summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2016-07-02 11:41:39 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2016-07-02 11:41:39 +0000
commit3bc1edf95ba7ec0ed52d80e5f18f167360d44427 (patch)
tree17093af9a6c069a04948ba0e2e3373a3b824345a /llvm/lib/Transforms
parent270cf12b3ba8fb2c2e4e424582725344eda6f9eb (diff)
downloadbcm5719-llvm-3bc1edf95ba7ec0ed52d80e5f18f167360d44427.tar.gz
bcm5719-llvm-3bc1edf95ba7ec0ed52d80e5f18f167360d44427.zip
Use arrays or initializer lists to feed ArrayRefs instead of SmallVector where possible.
No functionality change intended. llvm-svn: 274431
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp b/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
index 1288175200c..b4070b60276 100644
--- a/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
+++ b/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
@@ -633,11 +633,8 @@ bool GCOVProfiler::emitProfileArcs() {
Value *Sel = Builder.CreateSelect(BI->getCondition(),
Builder.getInt64(Edge),
Builder.getInt64(Edge + 1));
- SmallVector<Value *, 2> Idx;
- Idx.push_back(Builder.getInt64(0));
- Idx.push_back(Sel);
- Value *Counter = Builder.CreateInBoundsGEP(Counters->getValueType(),
- Counters, Idx);
+ Value *Counter = Builder.CreateInBoundsGEP(
+ Counters->getValueType(), Counters, {Builder.getInt64(0), Sel});
Value *Count = Builder.CreateLoad(Counter);
Count = Builder.CreateAdd(Count, Builder.getInt64(1));
Builder.CreateStore(Count, Counter);
OpenPOWER on IntegriCloud