summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineDebugInfo.cpp
diff options
context:
space:
mode:
authorJim Laskey <jlaskey@mac.com>2006-01-26 21:22:49 +0000
committerJim Laskey <jlaskey@mac.com>2006-01-26 21:22:49 +0000
commit0689dfad23609929ea6d5dd5693af5859a170d54 (patch)
tree5ef80602507d83d6dd5ccea74def6d93a7c60796 /llvm/lib/CodeGen/MachineDebugInfo.cpp
parent15a8c15a1ff03b88ad93b9015b2a86dd10f035b8 (diff)
downloadbcm5719-llvm-0689dfad23609929ea6d5dd5693af5859a170d54.tar.gz
bcm5719-llvm-0689dfad23609929ea6d5dd5693af5859a170d54.zip
Use global information to fill out Dwarf compile units.
llvm-svn: 25662
Diffstat (limited to 'llvm/lib/CodeGen/MachineDebugInfo.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineDebugInfo.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachineDebugInfo.cpp b/llvm/lib/CodeGen/MachineDebugInfo.cpp
index bfcd9815d4e..7d7bb932c6a 100644
--- a/llvm/lib/CodeGen/MachineDebugInfo.cpp
+++ b/llvm/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) {
OpenPOWER on IntegriCloud