This is an archive of the discontinued LLVM Phabricator instance.

[Reproducers] Have clang make use of lldb's VFS.
ClosedPublic

Authored by JDevlieghere on Feb 15 2019, 3:05 PM.

Details

Summary

In r353906 we hooked up clang and lldb's reproducer infrastructure to
capture files used by clang. This patch adds the necessary logic to have
clang reuse the files from lldb's reproducer during replay.

Diff Detail

Repository
rLLDB LLDB

Event Timeline

JDevlieghere created this revision.Feb 15 2019, 3:05 PM
aprantl added inline comments.Feb 15 2019, 3:09 PM
lldb/lit/Reproducer/Modules/Inputs/main.cpp
5

This is not very robust, since there is no code on this line. Personally I'd use:

void stop() {}

int main(int argc, char **argv) {
  Foo foo;
  stop(); // break here
  return 0;
}
lldb/lit/Reproducer/Modules/TestModuleCXX.test
9

does %clang set a -fmodule-cache-path ?
Please make sure that one is set otherwise this will cause chaos on incremental bots where upstream clang changes the PCM file format without bumping the version number,.

  • Code review feedback Adrian
aprantl added inline comments.Feb 15 2019, 3:49 PM
lldb/lit/Reproducer/Modules/TestModuleCXX.test
18

Does %lldb source the config file that sets the module cache path?
I think it does...

lldb/lit/Reproducer/Modules/TestModuleCocoa.test
9

Does this have to be the real Cocoa? It's both really expensive to compile it and will vary based on the SDK.

  • Have lldb use a custom module cache and remove it before replaying the reproducer.
  • Remove the cocoa test now that we have a capture and replay test.
aprantl accepted this revision.Feb 15 2019, 5:45 PM

LGTM as long as we always set a custom module cache path.

This revision is now accepted and ready to land.Feb 15 2019, 5:45 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptFeb 18 2019, 12:31 PM
lldb/lit/Reproducer/Modules/TestModuleCXX.test