diff options
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) { |