From 8ebc973133a83360b81be6f0d61203de3e2b211e Mon Sep 17 00:00:00 2001 From: Sean Callanan Date: Thu, 28 May 2015 20:07:44 +0000 Subject: If we see an external function in the symbols, make it an extern "C" function instead of a C++ function so that Clang doesn't emit a mangled function reference. Also removed the hack in ClangExpressionDeclMap that works around this. llvm-svn: 238476 --- lldb/source/Expression/ClangExpressionDeclMap.cpp | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'lldb/source/Expression/ClangExpressionDeclMap.cpp') diff --git a/lldb/source/Expression/ClangExpressionDeclMap.cpp b/lldb/source/Expression/ClangExpressionDeclMap.cpp index b36118c616c..7574723b99a 100644 --- a/lldb/source/Expression/ClangExpressionDeclMap.cpp +++ b/lldb/source/Expression/ClangExpressionDeclMap.cpp @@ -596,29 +596,6 @@ ClangExpressionDeclMap::GetFunctionAddress sc_list_size = sc_list.GetSize(); } } - - if (sc_list_size == 0) - { - // Sometimes we get a mangled name for a global function that actually should be "extern C." - // This is a hack to compensate. - - const bool is_mangled = true; - Mangled mangled(name, is_mangled); - - CPPLanguageRuntime::MethodName method_name(mangled.GetDemangledName()); - - // the C++ context must be empty before we can think of searching for symbol by a simple basename - if (method_name.GetContext().empty()) - { - llvm::StringRef basename = method_name.GetBasename(); - - if (!basename.empty()) - { - FindCodeSymbolInContext(ConstString(basename), m_parser_vars->m_sym_ctx, sc_list); - sc_list_size = sc_list.GetSize(); - } - } - } lldb::addr_t intern_callable_load_addr = LLDB_INVALID_ADDRESS; -- cgit v1.2.3