diff options
author | Jim Laskey <jlaskey@mac.com> | 2006-01-26 21:22:49 +0000 |
---|---|---|
committer | Jim Laskey <jlaskey@mac.com> | 2006-01-26 21:22:49 +0000 |
commit | 6e87c0e029c011b9ee61068c607080ca4934378a (patch) | |
tree | 461d03d7672523772cac862a4a47d2f4089a5403 /lib/CodeGen/MachineDebugInfo.cpp | |
parent | 9471c8a93b117d8ac01c4ef1cb9faa583e03dec0 (diff) |
Use global information to fill out Dwarf compile units.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25662 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineDebugInfo.cpp')
-rw-r--r-- | lib/CodeGen/MachineDebugInfo.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/CodeGen/MachineDebugInfo.cpp b/lib/CodeGen/MachineDebugInfo.cpp index bfcd9815d4..7d7bb932c6 100644 --- a/lib/CodeGen/MachineDebugInfo.cpp +++ b/lib/CodeGen/MachineDebugInfo.cpp @@ -180,7 +180,7 @@ unsigned GlobalWrapper::getTag() const { /// getContext - Return the "lldb.compile_unit" context global. /// GlobalVariable *GlobalWrapper::getContext() const { - return dyn_cast<GlobalVariable>(IC->getOperand(1)); + return cast<GlobalVariable>(IC->getOperand(1)); } /// getName - Return the name of the global. @@ -192,7 +192,7 @@ const std::string GlobalWrapper::getName() const { /// getType - Return the type of the global. /// const GlobalVariable *GlobalWrapper::getType() const { - return dyn_cast<GlobalVariable>(IC->getOperand(4)); + return cast<GlobalVariable>(IC->getOperand(4)); } /// isStatic - Return true if the global is static. @@ -274,6 +274,12 @@ void MachineDebugInfo::SetupCompileUnits(Module &M) { if (CompileUnits.size() != Globals.size()) CompileUnits.reset(); } +/// getCompileUnits - Return a vector of debug compile units. +/// +const UniqueVector<CompileUnitWrapper> MachineDebugInfo::getCompileUnits()const{ + return CompileUnits; +} + /// getGlobalVariables - Return a vector of debug global variables. /// std::vector<GlobalWrapper> MachineDebugInfo::getGlobalVariables(Module &M) { |