This is an archive of the discontinued LLVM Phabricator instance.

[Frontend] Add flag to allow PCM generation despite compiler errors
ClosedPublic

Authored by bnbarham on Nov 16 2020, 4:24 PM.

Details

Summary

As with precompiled headers, it's useful for indexers to be able to
continue through compiler errors in dependent modules.

Resolves rdar://69816264

Diff Detail

Event Timeline

bnbarham created this revision.Nov 16 2020, 4:24 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 16 2020, 4:24 PM
bnbarham requested review of this revision.Nov 16 2020, 4:24 PM
bnbarham updated this revision to Diff 305622.Nov 16 2020, 4:28 PM

Noticed I had left in the -fdisable-module-hash flags in the test, removed now.

I'd like if we only had to use one flag (-fallow-pcm-with-compiler-errors) and have it handle both modules and PCH. Could you make the flag also work for PCH and/or add a test that verifies it works?
You may only have to change

Opts.AllowPCHWithCompilerErrors = Args.hasArg(OPT_fallow_pch_with_errors);

to

Opts.AllowPCHWithCompilerErrors = Args.hasArg(OPT_fallow_pch_with_errors, OPT_fallow_pcm_with_errors);
bnbarham updated this revision to Diff 305914.Nov 17 2020, 3:43 PM

Have allow-pcm also set allow-pch + test to make sure that works.

akyrtzi accepted this revision.Nov 17 2020, 4:45 PM
This revision is now accepted and ready to land.Nov 17 2020, 4:45 PM