On Wed, 30 Aug 2006, Reid Spencer wrote:
Personally, I consider this "compatibility" to be wrong since it allows
callers to avoid the error message. We should report errors that occur.

Depends on the client. In this case, it was a gratuitous source-level incompatibility...

-Chris

On Wed, 2006-08-30 at 15:48 -0500, Chris Lattner wrote:

Changes in directory llvm/include/llvm/Bytecode:

Reader.h updated: 1.26 -> 1.27
---
Log message:

Restore source-level compatibility with clients of these functions.


---
Diffs of the changes:  (+6 -6)

 Reader.h |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)


Index: llvm/include/llvm/Bytecode/Reader.h
diff -u llvm/include/llvm/Bytecode/Reader.h:1.26 
llvm/include/llvm/Bytecode/Reader.h:1.27
--- llvm/include/llvm/Bytecode/Reader.h:1.26    Fri Aug 25 12:43:11 2006
+++ llvm/include/llvm/Bytecode/Reader.h Wed Aug 30 15:47:48 2006
@@ -36,7 +36,7 @@
 /// @brief Get a ModuleProvide for a bytecode file.
 ModuleProvider *getBytecodeModuleProvider(
   const std::string &Filename,  ///< Name of file to be read
-  std::string* ErrMsg,          ///< Optional error message holder
+  std::string* ErrMsg = 0,      ///< Optional error message holder
   BytecodeHandler* H = 0        ///< Optional handler for reader events
 );

@@ -49,8 +49,8 @@
   const unsigned char *Buffer,    ///< Start of buffer to parse
   unsigned BufferSize,            ///< Size of the buffer
   const std::string &ModuleID,    ///< Name to give the module
-  std::string* ErrMsg,            ///< Optional place to return an error 
message
-  BytecodeHandler* H              ///< Optional handler for reader events
+  std::string* ErrMsg = 0,        ///< Optional place to return an error 
message
+  BytecodeHandler* H = 0          ///< Optional handler for reader events
 );

 /// This is the main interface to bytecode parsing. It opens the file specified
@@ -84,7 +84,7 @@
 bool GetBytecodeDependentLibraries(
   const std::string &fileName,       ///< File name to read bytecode from
   Module::LibraryListType& deplibs,  ///< List of dependent libraries extracted
-  std::string* ErrMsg                ///< Optional error message holder
+  std::string* ErrMsg = 0            ///< Optional error message holder
 );

 /// This function will read only the necessary parts of a bytecode file in 
order
@@ -96,7 +96,7 @@
 bool GetBytecodeSymbols(
   const sys::Path& fileName,       ///< Filename to read bytecode from
   std::vector<std::string>& syms,  ///< Vector to return symbols in
-  std::string* ErrMsg              ///< Optional error message holder
+  std::string* ErrMsg = 0          ///< Optional error message holder
 );

 /// This function will read only the necessary parts of a bytecode buffer in
@@ -111,7 +111,7 @@
   unsigned Length,                   ///< The length of \p Buffer
   const std::string& ModuleID,       ///< An identifier for the module
   std::vector<std::string>& symbols, ///< The symbols defined in the module
-  std::string* ErrMsg                ///< Optional error message holder
+  std::string* ErrMsg = 0            ///< Optional error message holder
 );

 } // End llvm namespace



_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits


-Chris

--
http://nondot.org/sabre/
http://llvm.org/
_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to