[llvm-commits] [llvm] r74614 - in /llvm/trunk: examples/BrainF/ examples/Fibonacci/ examples/HowToUseJIT/ examples/Kaleidoscope/ examples/ModuleMaker/ examples/ParallelJIT/ include/llvm-c/ include/llvm/ include/llvm/Assembly/ include/llvm/Bitcode/ include/llvm/Debugger/ include/llvm/Transforms/Utils/ lib/Archive/ lib/AsmParser/ lib/Bitcode/Reader/ lib/Debugger/ lib/Linker/ lib/Transforms/Utils/ lib/VMCore/ tools/bugpoint/ tools/llc/ tools/lli/ tools/llvm-ar/ tools/llvm-as/ tools/llvm-db/ tools/llvm-dis/ tools/llvm-extr...

Stuart Hastings stuart at apple.com
Wed Jul 1 11:21:26 PDT 2009


Owen, I was running an Apple-Style(tm) build of LLVM-GCC  and got this:

/Developer/usr/local/include/llvm/Bitcode/ReaderWriter.h: In function  
'void dummy_function()':
/Developer/usr/local/include/llvm/Bitcode/ReaderWriter.h:42: error:  
too few arguments to function 'llvm::Module*  
llvm::ParseBitcodeFile(llvm::MemoryBuffer*, llvm::LLVMC\
ontext*, std::string*)'

Could this be related to your change^H^H^H^H^H^Himprovement to  
ReaderWriter.h  ?

stuart

On Jul 1, 2009, at 9:58 AM, Owen Anderson wrote:

> Author: resistor
> Date: Wed Jul  1 11:58:40 2009
> New Revision: 74614
>
> URL: http://llvm.org/viewvc/llvm-project?rev=74614&view=rev
> Log:
> Add a pointer to the owning LLVMContext to Module.  This requires  
> threading LLVMContext through a lot
> of the bitcode reader and ASM parser APIs, as well as supporting it  
> in all of the tools.
>
> Patches for Clang and LLVM-GCC to follow.
>
> Modified:
>    llvm/trunk/examples/BrainF/BrainF.cpp
>    llvm/trunk/examples/BrainF/BrainF.h
>    llvm/trunk/examples/BrainF/BrainFDriver.cpp
>    llvm/trunk/examples/Fibonacci/fibonacci.cpp
>    llvm/trunk/examples/HowToUseJIT/HowToUseJIT.cpp
>    llvm/trunk/examples/Kaleidoscope/toy.cpp
>    llvm/trunk/examples/ModuleMaker/ModuleMaker.cpp
>    llvm/trunk/examples/ParallelJIT/ParallelJIT.cpp
>    llvm/trunk/include/llvm-c/BitReader.h
>    llvm/trunk/include/llvm-c/Core.h
>    llvm/trunk/include/llvm/Assembly/Parser.h
>    llvm/trunk/include/llvm/Bitcode/Archive.h
>    llvm/trunk/include/llvm/Bitcode/ReaderWriter.h
>    llvm/trunk/include/llvm/Debugger/Debugger.h
>    llvm/trunk/include/llvm/LinkAllVMCore.h
>    llvm/trunk/include/llvm/Linker.h
>    llvm/trunk/include/llvm/Module.h
>    llvm/trunk/include/llvm/Transforms/Utils/Cloning.h
>    llvm/trunk/lib/Archive/Archive.cpp
>    llvm/trunk/lib/Archive/ArchiveInternals.h
>    llvm/trunk/lib/Archive/ArchiveReader.cpp
>    llvm/trunk/lib/Archive/ArchiveWriter.cpp
>    llvm/trunk/lib/AsmParser/Parser.cpp
>    llvm/trunk/lib/Bitcode/Reader/BitReader.cpp
>    llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp
>    llvm/trunk/lib/Bitcode/Reader/BitcodeReader.h
>    llvm/trunk/lib/Debugger/Debugger.cpp
>    llvm/trunk/lib/Linker/LinkArchives.cpp
>    llvm/trunk/lib/Linker/LinkItems.cpp
>    llvm/trunk/lib/Linker/Linker.cpp
>    llvm/trunk/lib/Transforms/Utils/CloneModule.cpp
>    llvm/trunk/lib/VMCore/Core.cpp
>    llvm/trunk/lib/VMCore/Module.cpp
>    llvm/trunk/tools/bugpoint/BugDriver.cpp
>    llvm/trunk/tools/bugpoint/BugDriver.h
>    llvm/trunk/tools/bugpoint/CrashDebugger.cpp
>    llvm/trunk/tools/bugpoint/Miscompilation.cpp
>    llvm/trunk/tools/bugpoint/OptimizerDriver.cpp
>    llvm/trunk/tools/bugpoint/bugpoint.cpp
>    llvm/trunk/tools/llc/llc.cpp
>    llvm/trunk/tools/lli/lli.cpp
>    llvm/trunk/tools/llvm-ar/llvm-ar.cpp
>    llvm/trunk/tools/llvm-as/llvm-as.cpp
>    llvm/trunk/tools/llvm-db/CLIDebugger.cpp
>    llvm/trunk/tools/llvm-db/CLIDebugger.h
>    llvm/trunk/tools/llvm-db/Commands.cpp
>    llvm/trunk/tools/llvm-db/llvm-db.cpp
>    llvm/trunk/tools/llvm-dis/llvm-dis.cpp
>    llvm/trunk/tools/llvm-extract/llvm-extract.cpp
>    llvm/trunk/tools/llvm-ld/llvm-ld.cpp
>    llvm/trunk/tools/llvm-link/llvm-link.cpp
>    llvm/trunk/tools/llvm-nm/llvm-nm.cpp
>    llvm/trunk/tools/llvm-prof/llvm-prof.cpp
>    llvm/trunk/tools/llvm-ranlib/llvm-ranlib.cpp
>    llvm/trunk/tools/lto/LTOCodeGenerator.cpp
>    llvm/trunk/tools/lto/LTOCodeGenerator.h
>    llvm/trunk/tools/lto/LTOModule.cpp
>    llvm/trunk/tools/lto/LTOModule.h
>    llvm/trunk/tools/lto/lto.cpp
>    llvm/trunk/tools/opt/opt.cpp

[snip]
>
> Modified: llvm/trunk/include/llvm/Bitcode/ReaderWriter.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Bitcode/ReaderWriter.h?rev=74614&r1=74613&r2=74614&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/include/llvm/Bitcode/ReaderWriter.h (original)
> +++ llvm/trunk/include/llvm/Bitcode/ReaderWriter.h Wed Jul  1  
> 11:58:40 2009
> @@ -23,6 +23,7 @@
>   class MemoryBuffer;
>   class ModulePass;
>   class BitstreamWriter;
> +  class LLVMContext;
>   class raw_ostream;
>
>   /// getBitcodeModuleProvider - Read the header of the specified  
> bitcode buffer
> @@ -31,12 +32,14 @@
>   /// error, this returns null, *does not* take ownership of Buffer,  
> and fills
>   /// in *ErrMsg with an error description if ErrMsg is non-null.
>   ModuleProvider *getBitcodeModuleProvider(MemoryBuffer *Buffer,
> +                                           LLVMContext* Context,
>                                            std::string *ErrMsg = 0);
>
>   /// ParseBitcodeFile - Read the specified bitcode file, returning  
> the module.
>   /// If an error occurs, this returns null and fills in *ErrMsg if  
> it is
>   /// non-null.  This method *never* takes ownership of Buffer.
> -  Module *ParseBitcodeFile(MemoryBuffer *Buffer, std::string  
> *ErrMsg = 0);
> +  Module *ParseBitcodeFile(MemoryBuffer *Buffer, LLVMContext*  
> Context,
> +                           std::string *ErrMsg = 0);
>
>   /// WriteBitcodeToFile - Write the specified module to the  
> specified output
>   /// stream.
>





More information about the llvm-commits mailing list