mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-27 15:14:31 +00:00
Fixed TypeMemberFunctionImpl to not use clang types directly but use the new CompilerDecl class to do the job in an abstract way.
Fixed a crash that would happen if you tried to get the name of a constructor or destructor by calling "getDeclName()" instead of calling getName() (which would assert and crash). Added the ability to get function arguments names from SBFunction. llvm-svn: 252622
This commit is contained in:
1 parent
a01a5ee72f
commit
fe68904fa6
15 files changed
+335
-102
No files matched your search
@@ -16,6 +16,7 @@
|
||||
#include "lldb/Symbol/CompileUnit.h"
|
||||
#include "lldb/Symbol/Function.h"
|
||||
#include "lldb/Symbol/Type.h"
|
||||
#include "lldb/Symbol/VariableList.h"
|
||||
#include "lldb/Target/ExecutionContext.h"
|
||||
#include "lldb/Target/Target.h"
|
||||
|
||||
@@ -216,6 +217,24 @@ SBFunction::GetEndAddress ()
|
||||
return addr;
|
||||
}
|
||||
|
||||
const char *
|
||||
SBFunction::GetArgumentName (uint32_t arg_idx)
|
||||
{
|
||||
if (m_opaque_ptr)
|
||||
{
|
||||
Block &block = m_opaque_ptr->GetBlock(true);
|
||||
VariableListSP variable_list_sp = block.GetBlockVariableList(true);
|
||||
if (variable_list_sp)
|
||||
{
|
||||
VariableList arguments;
|
||||
variable_list_sp->AppendVariablesWithScope (eValueTypeVariableArgument, arguments, true);
|
||||
lldb::VariableSP variable_sp = arguments.GetVariableAtIndex(arg_idx);
|
||||
if (variable_sp)
|
||||
return variable_sp->GetName().GetCString();
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
uint32_t
|
||||
SBFunction::GetPrologueByteSize ()
|
||||
|
||||
Reference in new issue
Block a user