Skip to content
Commit a12dae37 authored by Andrea Di Biagio's avatar Andrea Di Biagio
Browse files

[Windows] Fix assertion failure when passing 'nul' in input to clang.

Before this patch, if 'nul' was passed in input to clang, function
getStatus() (in Path.inc) always returned an instance of file_status with
field 'nFileSizeHigh' and 'nFileSizeLow' left uninitialized.

This was causing the triggering of an assertion failure in MemoryBuffer.cpp due
to an invalid FileSize for device 'nul'.

This patch fixes the assertion failure modifying the constructors of class
file_status (in llvm/Support/FileSystem.h) so that every field of the class
gets initialized to zero by default.

A clang test will be submitted on a separate patch.

llvm-svn: 207575
parent cd64780d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment