summaryrefslogtreecommitdiffstats
path: root/source/API/SBModule.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2015-12-30 11:55:28 +0000
committerdim <dim@FreeBSD.org>2015-12-30 11:55:28 +0000
commit66b75430a93929d6fc6ed63db14ca28e3ad5b1f6 (patch)
tree9ed5e1a91f242e2cb5911577356e487a55c01b78 /source/API/SBModule.cpp
parent23814158e5384f73c6fa951b66d5f807f9c24a2b (diff)
downloadFreeBSD-src-66b75430a93929d6fc6ed63db14ca28e3ad5b1f6.zip
FreeBSD-src-66b75430a93929d6fc6ed63db14ca28e3ad5b1f6.tar.gz
Vendor import of stripped lldb trunk r256633:
https://llvm.org/svn/llvm-project/lldb/trunk@256633
Diffstat (limited to 'source/API/SBModule.cpp')
-rw-r--r--source/API/SBModule.cpp24
1 files changed, 18 insertions, 6 deletions
diff --git a/source/API/SBModule.cpp b/source/API/SBModule.cpp
index 0249a7e..a810940 100644
--- a/source/API/SBModule.cpp
+++ b/source/API/SBModule.cpp
@@ -20,10 +20,10 @@
#include "lldb/Core/StreamString.h"
#include "lldb/Core/ValueObjectList.h"
#include "lldb/Core/ValueObjectVariable.h"
-#include "lldb/Symbol/ClangASTContext.h"
#include "lldb/Symbol/ObjectFile.h"
#include "lldb/Symbol/SymbolVendor.h"
#include "lldb/Symbol/Symtab.h"
+#include "lldb/Symbol/TypeSystem.h"
#include "lldb/Symbol/VariableList.h"
#include "lldb/Target/Target.h"
@@ -521,7 +521,11 @@ SBModule::FindFirstType (const char *name_cstr)
sb_type = SBType (module_sp->FindFirstType(sc, name, exact_match));
if (!sb_type.IsValid())
- sb_type = SBType (ClangASTContext::GetBasicType (module_sp->GetClangASTContext().getASTContext(), name));
+ {
+ TypeSystem *type_system = module_sp->GetTypeSystemForLanguage(eLanguageTypeC);
+ if (type_system)
+ sb_type = SBType (type_system->GetBuiltinTypeByName(name));
+ }
}
return sb_type;
}
@@ -531,7 +535,11 @@ SBModule::GetBasicType(lldb::BasicType type)
{
ModuleSP module_sp (GetSP ());
if (module_sp)
- return SBType (ClangASTContext::GetBasicType (module_sp->GetClangASTContext().getASTContext(), type));
+ {
+ TypeSystem *type_system = module_sp->GetTypeSystemForLanguage(eLanguageTypeC);
+ if (type_system)
+ return SBType (type_system->GetBasicTypeFromAST(type));
+ }
return SBType();
}
@@ -564,9 +572,13 @@ SBModule::FindTypes (const char *type)
}
else
{
- SBType sb_type(ClangASTContext::GetBasicType (module_sp->GetClangASTContext().getASTContext(), name));
- if (sb_type.IsValid())
- retval.Append(sb_type);
+ TypeSystem *type_system = module_sp->GetTypeSystemForLanguage(eLanguageTypeC);
+ if (type_system)
+ {
+ CompilerType compiler_type = type_system->GetBuiltinTypeByName(name);
+ if (compiler_type)
+ retval.Append(SBType(compiler_type));
+ }
}
}
OpenPOWER on IntegriCloud