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 | 21b742ffce7bec3d71e09c7c6d901a756d55feb3 (patch) | |
tree | fd7506c0c57e7e667f12579e8741f71cea49db99 /lib/Transforms/Instrumentation | |
parent | 90a4f78d3b23576da92a60a731cb34767fd75db8 (diff) | |
download | external_llvm-21b742ffce7bec3d71e09c7c6d901a756d55feb3.zip external_llvm-21b742ffce7bec3d71e09c7c6d901a756d55feb3.tar.gz external_llvm-21b742ffce7bec3d71e09c7c6d901a756d55feb3.tar.bz2 |
Use ArrayRef instead of SmallVector when passing vector into function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162851 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Instrumentation')
-rw-r--r-- | lib/Transforms/Instrumentation/GCOVProfiling.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/Transforms/Instrumentation/GCOVProfiling.cpp b/lib/Transforms/Instrumentation/GCOVProfiling.cpp index 264a6a6..293bad3 100644 --- a/lib/Transforms/Instrumentation/GCOVProfiling.cpp +++ b/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); |