Try to open the file before use data from stat.
-rw-r--r-- 84 .arcconfig
-rw-r--r-- 1687 .gitignore
-rw-r--r-- 16980 CMakeLists.txt
-rw-r--r-- 3079 CODE_OWNERS.TXT
-rw-r--r-- 10232 CREDITS.TXT
-rw-r--r-- 3331 LICENSE.TXT
-rw-r--r-- 752 LLVMBuild.txt
-rw-r--r-- 8616 Makefile
-rw-r--r-- 2599 Makefile.common
-rw-r--r-- 12425 Makefile.config.in
-rw-r--r-- 79472 Makefile.rules
-rw-r--r-- 688 README.txt
drwxr-xr-x - autoconf
drwxr-xr-x - bindings
drwxr-xr-x - cmake
-rwxr-xr-x 694678 configure
drwxr-xr-x - docs
drwxr-xr-x - examples
drwxr-xr-x - include
drwxr-xr-x - lib
-rw-r--r-- 1865 llvm.spec.in
drwxr-xr-x - projects
drwxr-xr-x - runtime
drwxr-xr-x - test
drwxr-xr-x - tools
drwxr-xr-x - unittests
drwxr-xr-x - utils