diff options
| author | Bill Wendling <isanbard@gmail.com> | 2012-08-29 18:45:41 +0000 |
|---|---|---|
| committer | Bill Wendling <isanbard@gmail.com> | 2012-08-29 18:45:41 +0000 |
| commit | e8aee6b8a58b52a61b14cfc5cb7ea5fedfbf7dcd (patch) | |
| tree | c7fe005472880a2af4eaf24b62c4d8e68a9ceb02 /llvm/lib/Transforms/Instrumentation | |
| parent | cb9ad9908bc4fd27625fd9960081d2c3943dfb6d (diff) | |
| download | bcm5719-llvm-e8aee6b8a58b52a61b14cfc5cb7ea5fedfbf7dcd.tar.gz bcm5719-llvm-e8aee6b8a58b52a61b14cfc5cb7ea5fedfbf7dcd.zip | |
Use ArrayRef instead of SmallVector when passing vector into function.
llvm-svn: 162851
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation')
| -rw-r--r-- | llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp b/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp index 264a6a61536..293bad32c82 100644 --- a/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp +++ b/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp @@ -88,8 +88,7 @@ namespace { // Add the function to write out all our counters to the global destructor // list. - void insertCounterWriteout(SmallVector<std::pair<GlobalVariable *, - MDNode *>, 8> &); + void insertCounterWriteout(ArrayRef<std::pair<GlobalVariable*, MDNode*> >); void insertIndirectCounterIncrement(); std::string mangleName(DICompileUnit CU, std::string NewStem); @@ -630,7 +629,7 @@ GlobalVariable *GCOVProfiler::getEdgeStateValue() { } void GCOVProfiler::insertCounterWriteout( - SmallVector<std::pair<GlobalVariable *, MDNode *>, 8> &CountersBySP) { + ArrayRef<std::pair<GlobalVariable *, MDNode *> > CountersBySP) { FunctionType *WriteoutFTy = FunctionType::get(Type::getVoidTy(*Ctx), false); Function *WriteoutF = Function::Create(WriteoutFTy, @@ -652,7 +651,7 @@ void GCOVProfiler::insertCounterWriteout( std::string FilenameGcda = mangleName(compile_unit, "gcda"); Builder.CreateCall(StartFile, Builder.CreateGlobalStringPtr(FilenameGcda)); - for (SmallVector<std::pair<GlobalVariable *, MDNode *>, 8>::iterator + for (ArrayRef<std::pair<GlobalVariable *, MDNode *> >::iterator I = CountersBySP.begin(), E = CountersBySP.end(); I != E; ++I) { DISubprogram SP(I->second); |

