diff options
author | Ryan Brown <ribrdb@google.com> | 2015-10-06 20:29:31 +0000 |
---|---|---|
committer | Ryan Brown <ribrdb@google.com> | 2015-10-06 20:29:31 +0000 |
commit | 07a1c459f2631f2ad3e95d4becc0cd38af6a9be4 (patch) | |
tree | ce9b15c82dd9ec14d103567ec971b4625f2a9c46 /lldb/source | |
parent | 2afea5438f924af932cf62e39daa4a06e298fb37 (diff) | |
download | bcm5719-llvm-07a1c459f2631f2ad3e95d4becc0cd38af6a9be4.tar.gz bcm5719-llvm-07a1c459f2631f2ad3e95d4becc0cd38af6a9be4.zip |
Create GoLanguageRuntime.
GoLanguageRuntime supports finding the runtime type for Go interfaces.
llvm-svn: 249456
Diffstat (limited to 'lldb/source')
-rw-r--r-- | lldb/source/API/SystemInitializerFull.cpp | 2 | ||||
-rw-r--r-- | lldb/source/Plugins/LanguageRuntime/CMakeLists.txt | 1 | ||||
-rw-r--r-- | lldb/source/Symbol/GoASTContext.cpp | 3 |
3 files changed, 6 insertions, 0 deletions
diff --git a/lldb/source/API/SystemInitializerFull.cpp b/lldb/source/API/SystemInitializerFull.cpp index d085d91b5bf..d9fbbf99178 100644 --- a/lldb/source/API/SystemInitializerFull.cpp +++ b/lldb/source/API/SystemInitializerFull.cpp @@ -49,6 +49,7 @@ #include "Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h" #include "Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h" #include "Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h" +#include "Plugins/LanguageRuntime/Go/GoLanguageRuntime.h" #include "Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h" #include "Plugins/MemoryHistory/asan/MemoryHistoryASan.h" #include "Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h" @@ -289,6 +290,7 @@ SystemInitializerFull::Initialize() AppleObjCRuntimeV1::Initialize(); SystemRuntimeMacOSX::Initialize(); RenderScriptRuntime::Initialize(); + GoLanguageRuntime::Initialize(); CPlusPlusLanguage::Initialize(); ObjCLanguage::Initialize(); diff --git a/lldb/source/Plugins/LanguageRuntime/CMakeLists.txt b/lldb/source/Plugins/LanguageRuntime/CMakeLists.txt index c62791445a9..66b17a4af22 100644 --- a/lldb/source/Plugins/LanguageRuntime/CMakeLists.txt +++ b/lldb/source/Plugins/LanguageRuntime/CMakeLists.txt @@ -1,3 +1,4 @@ add_subdirectory(CPlusPlus) add_subdirectory(ObjC) +add_subdirectory(Go) add_subdirectory(RenderScript) diff --git a/lldb/source/Symbol/GoASTContext.cpp b/lldb/source/Symbol/GoASTContext.cpp index 6ba619087bc..6568b1253e6 100644 --- a/lldb/source/Symbol/GoASTContext.cpp +++ b/lldb/source/Symbol/GoASTContext.cpp @@ -1184,6 +1184,9 @@ GoASTContext::GetChildCompilerTypeAtIndex(lldb::opaque_compiler_type_t type, Exe uint32_t GoASTContext::GetIndexOfChildWithName(lldb::opaque_compiler_type_t type, const char *name, bool omit_empty_base_classes) { + if (!type || !GetCompleteType(type)) + return UINT_MAX; + GoType *t = static_cast<GoType *>(type); GoStruct *s = t->GetStruct(); if (s) |