On Nov 30, 2012, at 12:00 PM, Dmitri Gribenko <[email protected]> wrote:
> Hi Doug, > > On Fri, Nov 30, 2012 at 8:38 PM, Douglas Gregor <[email protected]> wrote: >> Author: dgregor >> Date: Fri Nov 30 12:38:50 2012 >> New Revision: 169021 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=169021&view=rev >> Log: >> When an error occurs while building a module on demand, provide "While >> building module 'Foo' imported from..." notes (the same we we provide >> "In file included from..." notes) in the diagnostic, so that we know >> how this module got included in the first place. This is part of >> <rdar://problem/12696425>. >> >> Added: >> cfe/trunk/test/Modules/build-fail-notes.m >> Modified: >> cfe/trunk/include/clang/Basic/SourceManager.h >> cfe/trunk/include/clang/Frontend/DiagnosticRenderer.h >> cfe/trunk/include/clang/Frontend/TextDiagnostic.h >> cfe/trunk/include/clang/Lex/PreprocessorOptions.h >> cfe/trunk/lib/Frontend/CompilerInstance.cpp >> cfe/trunk/lib/Frontend/DiagnosticRenderer.cpp >> cfe/trunk/lib/Frontend/TextDiagnostic.cpp >> cfe/trunk/test/Modules/cycles.c >> cfe/trunk/test/Modules/epic-fail.m >> >> Modified: cfe/trunk/include/clang/Basic/SourceManager.h >> URL: >> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/SourceManager.h?rev=169021&r1=169020&r2=169021&view=diff >> ============================================================================== >> --- cfe/trunk/include/clang/Basic/SourceManager.h (original) >> +++ cfe/trunk/include/clang/Basic/SourceManager.h Fri Nov 30 12:38:50 2012 >> @@ -40,6 +40,7 @@ >> #include "clang/Basic/SourceLocation.h" >> #include "llvm/Support/Allocator.h" >> #include "llvm/Support/DataTypes.h" >> +#include "llvm/ADT/ArrayRef.h" >> #include "llvm/ADT/PointerIntPair.h" >> #include "llvm/ADT/PointerUnion.h" >> #include "llvm/ADT/IntrusiveRefCntPtr.h" >> @@ -508,6 +509,11 @@ >> >> }; >> >> +/// \brief The path used when building modules on demand, which is used >> +/// to provide a link between the source managers of the different compiler >> +/// instances. >> +typedef llvm::ArrayRef<std::pair<std::string, FullSourceLoc> > >> ModuleBuildPath; >> + > > It might be the case that I am misunderstanding this abstraction, but > it might be better to call it 'ModuleBuildStack' or > 'ModuleBuildBacktrace'. ModuleBuildStack is better, thanks! >> /// \brief This class handles loading and caching of source files into >> memory. >> /// >> /// This object owns the MemoryBuffer objects for all of the loaded >> @@ -645,6 +651,15 @@ >> >> mutable llvm::DenseMap<FileID, MacroArgsMap *> MacroArgsCacheMap; >> >> + /// \brief The path of modules being built, which is used to detect >> + /// cycles in the module dependency graph as modules are being built, as >> + /// well as to describe > > Incomplete sentence here. r169045. - Doug _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
