[llvm-commits] [llvm-gcc-4.2] r53124 - /llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp
Bill Wendling
isanbard at gmail.com
Thu Jul 3 16:13:57 PDT 2008
Author: void
Date: Thu Jul 3 18:13:57 2008
New Revision: 53124
URL: http://llvm.org/viewvc/llvm-project?rev=53124&view=rev
Log:
Pass in std::vector by reference instead of returning by value.
Modified:
llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp
Modified: llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp?rev=53124&r1=53123&r2=53124&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-debug.cpp Thu Jul 3 18:13:57 2008
@@ -880,20 +880,20 @@
MachineModuleInfo MMI;
MMI.AnalyzeModule(*TheModule);
- std::vector<SubprogramDesc *> Subprograms =
- MMI.getAnchoredDescriptors<SubprogramDesc>(*TheModule);
+ std::vector<SubprogramDesc *> Subprograms;
+ MMI.getAnchoredDescriptors<SubprogramDesc>(*TheModule, Subprograms);
if (!Subprograms.empty())
SubprogramAnchor = Subprograms[0]->getAnchor();
- std::vector<CompileUnitDesc *> CUs =
- MMI.getAnchoredDescriptors<CompileUnitDesc>(*TheModule);
+ std::vector<CompileUnitDesc *> CUs;
+ MMI.getAnchoredDescriptors<CompileUnitDesc>(*TheModule, CUs);
if (!CUs.empty())
CompileUnitAnchor = CUs[0]->getAnchor();
- std::vector<GlobalVariableDesc *> GVs =
- MMI.getAnchoredDescriptors<GlobalVariableDesc>(*TheModule);
+ std::vector<GlobalVariableDesc *> GVs;
+ MMI.getAnchoredDescriptors<GlobalVariableDesc>(*TheModule, GVs);
if (!GVs.empty())
GlobalVariableAnchor = GVs[0]->getAnchor();
More information about the llvm-commits
mailing list