@@ -282,6 +282,7 @@ class SYCLToolchain {
282282 std::unique_ptr<MemoryBuffer> PrecompiledPreamble,
283283 const PreambleBounds &Bounds, CompilerInvocation &CI,
284284 IntrusiveRefCntPtr<llvm::vfs::FileSystem> &VFS) {
285+ std::cerr << __PRETTY_FUNCTION__ << " \n " ;
285286
286287 // Processing similar to PrecompiledPreamble::configurePreamble.
287288
@@ -361,15 +362,18 @@ class SYCLToolchain {
361362 // need this extra `Success` variable to be able to properly return
362363 // compilatoin status.
363364 bool Success = false ;
364- auto RunWithoutPCH = [&]() -> bool {
365+ auto RunWithoutPCH = [&](unsigned LINE = __builtin_LINE ()) -> bool {
366+ std::cerr << __PRETTY_FUNCTION__ << " " << LINE << " \n " ;
365367 // Run original invocation:
366368 Success =
367369 Action::runInvocation (std::move (Invocation), Files,
368370 std::move (PCHContainerOps), DiagConsumer);
369371 return Success;
370372 };
371373
372- auto UseCachedPreamble = [&](StringRef PCHContent) {
374+ auto UseCachedPreamble = [&](StringRef PCHContent,
375+ unsigned LINE = __builtin_LINE ()) {
376+ std::cerr << __PRETTY_FUNCTION__ << " " << LINE << " \n " ;
373377 std::unique_ptr<MemoryBuffer> PCHMemBuf =
374378 MemoryBuffer::getMemBufferCopy (PCHContent);
375379
@@ -395,6 +399,8 @@ class SYCLToolchain {
395399
396400 auto CacheCallback = [&](size_t , const Twine &,
397401 std::unique_ptr<MemoryBuffer> MB) -> void {
402+ std::cerr << __PRETTY_FUNCTION__ << " " << std::boolalpha << CacheHit
403+ << " \n " ;
398404 if (!CacheHit)
399405 return ; // See above.
400406
@@ -468,7 +474,11 @@ class SYCLToolchain {
468474
469475 OS << NewPreamble->memoryContents ();
470476
471- consumeError (CFS->commit ());
477+ auto Err = CFS->commit ();
478+ if (Err) {
479+ std::cerr << " Error in commit\n " ;
480+ }
481+ consumeError (std::move (Err));
472482
473483 return Success;
474484 } else {
0 commit comments