[llvm-commits] [llvm] r118681 - /llvm/trunk/lib/System/Win32/Path.inc

Michael Spencer bigcheesegs at gmail.com
Wed Nov 10 07:20:14 PST 2010


On Wed, Nov 10, 2010 at 10:12 AM, Charles Davis <cdavis at mymail.mines.edu> wrote:
> On 11/10/10 8:05 AM, Michael J. Spencer wrote:
>> @@ -376,7 +376,15 @@
>>
>>  bool
>>  Path::isSymLink() const {
>> -  return false;
>> +  DWORD attributes = GetFileAttributes(path.c_str());
>> +
>> +  if (attributes == INVALID_FILE_ATTRIBUTES)
>> +    // There's no sane way to report this :(.
>> +    assert(0 && "GetFileAttributes returned INVALID_FILE_ATTRIBUTES");
> Why don't you just assert attributes != INVALID_FILE_ATTRIBUTES?
>
> Chip

Originally it was a report_fatal_error, but that's in Support. I kept
it like that because I want to replace it with some proper error
handling code.

- Michael Spencer




More information about the llvm-commits mailing list