aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/DwarfWriter.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2008-06-27 00:09:40 +0000
committerBill Wendling <isanbard@gmail.com>2008-06-27 00:09:40 +0000
commit305635abeae1d20519b60856c89479e8b7b5d4dd (patch)
treebc0fa4982f774073b591b551e1b7d7b5b0a72821 /lib/CodeGen/DwarfWriter.cpp
parent72efde2dc736fde5a838a9771af3d99c0dd08540 (diff)
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! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52800 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/DwarfWriter.cpp')
-rw-r--r--lib/CodeGen/DwarfWriter.cpp23
1 files changed, 11 insertions, 12 deletions
diff --git a/lib/CodeGen/DwarfWriter.cpp b/lib/CodeGen/DwarfWriter.cpp
index cc5cf4d89a..f0687447eb 100644
--- a/lib/CodeGen/DwarfWriter.cpp
+++ b/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: