[llvm-commits] [PATCH] Replace all uses of std::string* for errors with error_code in Support/MemoryBuffer.
Chris Lattner
clattner at apple.com
Thu Dec 9 11:19:00 PST 2010
On Dec 9, 2010, at 7:21 AM, Michael Spencer wrote:
>> +++ b/include/llvm/Support/system_error.h
>> @@ -668,6 +668,11 @@ public:
>> const error_category& generic_category();
>> const error_category& system_category();
>>
>> +/// Get the error_category used for errno values from POSIX functions. This is
>> +/// the same as the system_category on POISIX systems, but is the same as the
>> +/// generic_category on Windows.
>> +const error_category& posix_category();
>>
>> Space before the &, not after.
>
> All the rest of the code is like this. It's from libc++ with minimal
> changes to make it easier to share future changes.
Ah ok!
>> Use of auto_ptr also self-documents that the client owns the result pointer. What do you think?
>
> I'd prefer OwningPtr, but I agree. It will take a lot longer to make
> this change because it will require some refactoring of clients to
> properly use the smart pointer, but I'll work on it.
You're right, owningptr is better, thanks Michael!
-Chris
More information about the llvm-commits
mailing list