[lldb-dev] llvm/clang source revs on Linux

Greg Clayton gclayton at apple.com
Tue Sep 27 15:43:43 PDT 2011


Often times parameters are added/removed from llvm and clang functions that we use. 

If you want to try and update clang on your own, feel free, but you will need to figure out the issues on your own. 


On Sep 27, 2011, at 3:07 PM, dawn at burble.org wrote:

> 
> When are folks planning to start using a later revision of llvm/clang for the
> Linux port?  In my troubles to get lldb building on Linux using the documented
> revision, I updated to the current llvm and clang revs.  I've attached a patch
> which gets me over some of the initial errors until I get to the following
> error:
> 
> [...]
> ClangExpressionParser.cpp: In function 'void LLVMErrorHandler(void*,
> 	        const std::string&)':
> ClangExpressionParser.cpp:108:11: error: 'class clang::Diagnostic' has
> no member named 'Report'
> ClangExpressionParser.cpp: In function 'clang::FrontendAction*
> CreateFrontendBaseAction(clang::CompilerInstance&)':
> ClangExpressionParser.cpp:135:67: error: no matching function for call
> to 'clang::GeneratePCHAction::GeneratePCHAction()'
> [...]
> 
> The code is:
>    static void LLVMErrorHandler(void *UserData, const std::string &Message) {
> 	Diagnostic &Diags = *static_cast<Diagnostic*>(UserData);
> 
> 	Diags.Report(diag::err_fe_error_backend) << Message;
> 	    
> 	// We cannot recover from llvm errors.
> 	exit(1);
>    }
> 
> Should this be using class DiagnosticsEngine instead of Diagnostic?
> It's not obvious how or where LLVMErrorHandler is used, so I'm having
> trouble figuring this one out. 
> 
> Would folks prefer that I continue down this path or backup and fix the 
> documented revision?  

Feel free to do this on your own if you want, or wait until we update. 

So much changes from clang build to clang build and this is why we lock onto a specific revision (so we don't have to deal with constantly changing APIs).

Again, any reason you want to update to the latest clang other than causing yourself pain?

Greg Clayton







More information about the lldb-dev mailing list