This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Log cc1 args at verbose level.
ClosedPublic

Authored by sammccall on Nov 28 2019, 10:23 AM.

Details

Summary

This will help debugging driver issues.

Diff Detail

Event Timeline

sammccall created this revision.Nov 28 2019, 10:23 AM

Fix Compiler.h changes that got mangled.

This revision was not accepted when it landed; it landed in state Needs Review.Nov 29 2019, 2:08 AM
This revision was automatically updated to reflect the committed changes.

Sorry, seems I was too late :(

clang-tools-extra/clangd/TUScheduler.cpp
412

buildCompilerInvocation(Inputs, CompilerInvocationDiagConsumer, &CC1Args)? Otherwise, I think the vector would always be empty, right?

clang/include/clang/Frontend/Utils.h
231

Nit: llvm::Optional might look better for CC1Args

sammccall marked 3 inline comments as done.Nov 29 2019, 3:07 AM

Sorry about committing this too early, had it confused with another patch. Fixed in 4f000824222f97c0cfd5b19951a1068132e57e79

clang-tools-extra/clangd/TUScheduler.cpp
412

You're right, I changed this after testing it.

Fixed in 4f000824222f97c0cfd5b19951a1068132e57e79

clang/include/clang/Frontend/Utils.h
231

Doesn't really work as we want optional + pass-by-reference here - a pointer is the usual idiom.