compiler error with building lldb from scratch

I just checked out lldb sources, open Xcode workspace
in attempt to build lldb-tool target

I got few errors like
virtual function 'FindExternalVisibleDeclsByName' has a different return type ('clang::DeclContextLookupResult' (aka 'MutableArrayRef<clang::NamedDecl *>')) than the function it overrides (which has return type 'bool')
    FindExternalVisibleDeclsByName (const clang::DeclContext *DC,

and indeed file
lldb/llvm/tools/clang/include/clang/AST/ExternalASTSource.h has the following declaration
  virtual bool
  FindExternalVisibleDeclsByName(const DeclContext *DC, DeclarationName Name);

but my llvm sources (173760)
has the following declaration

  virtual DeclContextLookupResult
  FindExternalVisibleDeclsByName(const DeclContext *DC, DeclarationName Name);

if I replace lldb/llvm folder with llvm folder (173760)

I got another error:
lldb/source/DataFormatters/CXXFormatterFunctions.cpp:14:10: fatal error: 'llvm/Support/ConvertUTF.h' file not found

that file does exist in the latest llvm repository
so if I copy that file to the lldb/llvm/include/llvm/Support folder

then build was ok


Dmitry Markman

This seems to be caused by the following commit.

thanks Abid

did you submit the fix?

I am new to lldb so I am not sure what the correct fix is? If the base class will stay the same then we can modify the derived to return bool also. If that sounds like a correct solution then I can prepare a patch.


No, simply returning BOOL is not sufficient (because then no results would be reported). I have talked to the Clang folks about this and I'll get a patch in this morning.


Abid, Dmitry, and everyone else:

I'm still working on this patch. It turns out the Clang changes break a few things (e.g., namespaces) and I'm working with Richard Smith and Doug Gregor to iron things out.
If I don't have a good, working patch today then I'll commit something so people can build at least.
Sorry for the sucky weekend.


Hi Sean,
don't worry
take your time

I was able to build lldb
so I wasn't stuck