diff options
| author | Bill Wendling <isanbard@gmail.com> | 2008-06-27 00:09:40 +0000 |
|---|---|---|
| committer | Bill Wendling <isanbard@gmail.com> | 2008-06-27 00:09:40 +0000 |
| commit | c758698d2c86fa0ad5c1a7a71b8da51c99dca953 (patch) | |
| tree | b8dd5a40f1b0952be76b685239167f0e9109b6c0 /llvm/lib/CodeGen/DwarfWriter.cpp | |
| parent | cf1ab190863ee83c38a683158f2ce897bfb8e4be (diff) | |
| download | bcm5719-llvm-c758698d2c86fa0ad5c1a7a71b8da51c99dca953.tar.gz bcm5719-llvm-c758698d2c86fa0ad5c1a7a71b8da51c99dca953.zip | |
Refactor the DebugInfoDesc stuff out of the MachineModuleInfo file. Clean up
some uses of std::vector, where it's return std::vector by value. Yuck!
llvm-svn: 52800
Diffstat (limited to 'llvm/lib/CodeGen/DwarfWriter.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/DwarfWriter.cpp | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/llvm/lib/CodeGen/DwarfWriter.cpp b/llvm/lib/CodeGen/DwarfWriter.cpp index cc5cf4d89ad..f0687447eba 100644 --- a/llvm/lib/CodeGen/DwarfWriter.cpp +++ b/llvm/lib/CodeGen/DwarfWriter.cpp @@ -20,6 +20,7 @@ #include "llvm/Module.h" #include "llvm/Type.h" #include "llvm/CodeGen/AsmPrinter.h" +#include "llvm/CodeGen/MachineDebugInfoDesc.h" #include "llvm/CodeGen/MachineModuleInfo.h" #include "llvm/CodeGen/MachineFrameInfo.h" #include "llvm/CodeGen/MachineLocation.h" @@ -2621,25 +2622,23 @@ private: /// ConstructGlobalDIEs - Create DIEs for each of the externally visible /// global variables. void ConstructGlobalDIEs() { - std::vector<GlobalVariableDesc *> GlobalVariables = - MMI->getAnchoredDescriptors<GlobalVariableDesc>(*M); + std::vector<void*> GlobalVariables; + GlobalVariableDesc GVD; + MMI->getAnchoredDescriptors(*M, &GVD, GlobalVariables); - for (unsigned i = 0, N = GlobalVariables.size(); i < N; ++i) { - GlobalVariableDesc *GVD = GlobalVariables[i]; - NewGlobalVariable(GVD); - } + for (unsigned i = 0, N = GlobalVariables.size(); i < N; ++i) + NewGlobalVariable((GlobalVariableDesc *)GlobalVariables[i]); } /// ConstructSubprogramDIEs - Create DIEs for each of the externally visible /// subprograms. void ConstructSubprogramDIEs() { - std::vector<SubprogramDesc *> Subprograms = - MMI->getAnchoredDescriptors<SubprogramDesc>(*M); + std::vector<void*> Subprograms; + SubprogramDesc SPD; + MMI->getAnchoredDescriptors(*M, &SPD, Subprograms); - for (unsigned i = 0, N = Subprograms.size(); i < N; ++i) { - SubprogramDesc *SPD = Subprograms[i]; - NewSubprogram(SPD); - } + for (unsigned i = 0, N = Subprograms.size(); i < N; ++i) + NewSubprogram((SubprogramDesc*)Subprograms[i]); } public: |

