r213454 - If a module build reports errors, don't try to load it

Sebastian Redl sebastian.redl at getdesigned.at
Sat Jul 19 10:00:08 PDT 2014


On 19 Jul 2014, at 18:29, Ben Langmuir <blangmuir at apple.com> wrote:

> Author: benlangmuir
> Date: Sat Jul 19 11:29:28 2014
> New Revision: 213454
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=213454&view=rev
> Log:
> If a module build reports errors, don't try to load it
> 
> ... just to find out that it didn't build.
> 
> Modified:
>    cfe/trunk/lib/Frontend/CompilerInstance.cpp
> 
> Modified: cfe/trunk/lib/Frontend/CompilerInstance.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInstance.cpp?rev=213454&r1=213453&r2=213454&view=diff
> ==============================================================================
> --- cfe/trunk/lib/Frontend/CompilerInstance.cpp (original)
> +++ cfe/trunk/lib/Frontend/CompilerInstance.cpp Sat Jul 19 11:29:28 2014
> @@ -852,11 +852,12 @@ static InputKind getSourceInputKindFromO
> }
> 
> /// \brief Compile a module file for the given module, using the options 
> -/// provided by the importing compiler instance.
> -static void compileModuleImpl(CompilerInstance &ImportingInstance,
> -                          SourceLocation ImportLoc,
> -                          Module *Module,
> -                          StringRef ModuleFileName) {
> +/// provided by the importing compiler instance. Returns true if the module
> +/// was built without errors.

That’s the opposite of the Clang convention - almost all functions return true on error.

Sebastian





More information about the cfe-commits mailing list