<feed xmlns='http://www.w3.org/2005/Atom'>
<title>bcm5719-llvm/clang/lib/Lex/HeaderSearch.cpp, branch meklort-10.0.1</title>
<subtitle>Project Ortega BCM5719 LLVM</subtitle>
<id>https://git.raptorcs.com/git/bcm5719-llvm/atom?h=meklort-10.0.1</id>
<link rel='self' href='https://git.raptorcs.com/git/bcm5719-llvm/atom?h=meklort-10.0.1'/>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/'/>
<updated>2019-10-11T18:22:34+00:00</updated>
<entry>
<title>[Stats] Convert some ad-hoc header search stats to ALWAYS_ENABLED_STATISTIC.</title>
<updated>2019-10-11T18:22:34+00:00</updated>
<author>
<name>Volodymyr Sapsai</name>
<email>vsapsai@apple.com</email>
</author>
<published>2019-10-11T18:22:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=e8752a9d1bcf7f68397d59cfe42eb304945dceec'/>
<id>urn:sha1:e8752a9d1bcf7f68397d59cfe42eb304945dceec</id>
<content type='text'>
rdar://problem/55715134

Reviewers: dsanders, bogner, rtereshin

Reviewed By: dsanders

Subscribers: hiraditya, jkorous, dexonsmith, ributzka, cfe-commits, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D68252

llvm-svn: 374581
</content>
</entry>
<entry>
<title>Fix -Wnonportable-include-path suppression for header maps with absolute paths.</title>
<updated>2019-09-11T20:39:04+00:00</updated>
<author>
<name>Volodymyr Sapsai</name>
<email>vsapsai@apple.com</email>
</author>
<published>2019-09-11T20:39:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=2f843616849963e8df7a561ce5179ed29a767057'/>
<id>urn:sha1:2f843616849963e8df7a561ce5179ed29a767057</id>
<content type='text'>
In `DirectoryLookup::LookupFile` parameter `HasBeenMapped` doesn't cover
the case when clang finds a file through a header map but doesn't remap
the lookup filename because the target path is an absolute path. As a
result, -Wnonportable-include-path suppression for header maps
introduced in r301592 wasn't triggered.

Change parameter `HasBeenMapped` to `IsInHeaderMap` and use parameter
`MappedName` to track the filename remapping. This way we can handle
both relative and absolute paths in header maps, and account for their
specific properties, like filename remapping being a property preserved
across lookups in multiple directories.

rdar://problem/39516483

Reviewers: dexonsmith, bruno

Reviewed By: dexonsmith

Subscribers: jkorous, cfe-commits, ributzka

Differential Revision: https://reviews.llvm.org/D58094

llvm-svn: 371655
</content>
</entry>
<entry>
<title>Introduce a DirectoryEntryRef that stores both a reference and an</title>
<updated>2019-08-31T01:26:04+00:00</updated>
<author>
<name>Alex Lorenz</name>
<email>arphaman@gmail.com</email>
</author>
<published>2019-08-31T01:26:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=0377ca641c9af0262270d091578cab19523b1bc6'/>
<id>urn:sha1:0377ca641c9af0262270d091578cab19523b1bc6</id>
<content type='text'>
accessed name to the directory entry

This commit introduces a parallel API that returns a DirectoryEntryRef
to the FileManager, similar to the parallel FileEntryRef API. All
uses will have to be update in follow-up patches. The immediate use of the new API in this
patch fixes the issue where a file manager was reused in clang-scan-deps,
but reported an different file path whenever a framework lookup was done through a symlink.

Differential Revision: https://reviews.llvm.org/D67026

llvm-svn: 370562
</content>
</entry>
<entry>
<title>FileManager: Use llvm::Expected in new getFileRef API</title>
<updated>2019-08-26T18:29:51+00:00</updated>
<author>
<name>Duncan P. N. Exon Smith</name>
<email>dexonsmith@apple.com</email>
</author>
<published>2019-08-26T18:29:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=9ef6c49baf45a06d5b54cc9c790c9397e584ba48'/>
<id>urn:sha1:9ef6c49baf45a06d5b54cc9c790c9397e584ba48</id>
<content type='text'>
`FileManager::getFileRef` is a modern API which we expect to convert to
over time.  We should modernize the error handling as well, using
`llvm::Expected` instead of `llvm::ErrorOr`, to help clients that care
about errors to ensure nothing is missed.

However, not all clients care.  I've also added another path for those
that don't:

- `FileEntryRef` is now copy- and move-assignable (using a pointer
  instead of a reference).
- `FileManager::getOptionalFileRef` returns an `llvm::Optional` instead
  of `llvm::Expected`.
- Added an `llvm::expectedToOptional` utility in case this is useful
  elsewhere.

https://reviews.llvm.org/D66705

llvm-svn: 369943
</content>
</entry>
<entry>
<title>Introduce FileEntryRef and use it when handling includes to report correct dependencies</title>
<updated>2019-08-22T18:15:50+00:00</updated>
<author>
<name>Alex Lorenz</name>
<email>arphaman@gmail.com</email>
</author>
<published>2019-08-22T18:15:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=4dc5573acc0d2e7c59d8bac2543eb25cb4b32984'/>
<id>urn:sha1:4dc5573acc0d2e7c59d8bac2543eb25cb4b32984</id>
<content type='text'>
when the FileManager is reused across invocations

This commit introduces a parallel API to FileManager's getFile: getFileEntryRef, which returns
a reference to the FileEntry, and the name that was used to access the file. In the case of
a VFS with 'use-external-names', the FileEntyRef contains the external name of the file,
not the filename that was used to access it.

The new API is adopted only in the HeaderSearch and Preprocessor for include file lookup, so that the
accessed path can be propagated to SourceManager's FileInfo. SourceManager's FileInfo now can report this accessed path, using
the new getName method. This API is then adopted in the dependency collector, which now correctly reports dependencies when a file
is included both using a symlink and a real path in the case when the FileManager is reused across multiple Preprocessor invocations.

Note that this patch does not fix all dependency collector issues, as the same problem is still present in other cases when dependencies
are obtained using FileSkipped, InclusionDirective, and HasInclude. This will be fixed in follow-up commits.

Differential Revision: https://reviews.llvm.org/D65907

llvm-svn: 369680
</content>
</entry>
<entry>
<title>Don't use std::errc</title>
<updated>2019-08-13T19:32:36+00:00</updated>
<author>
<name>Alexey Bataev</name>
<email>a.bataev@hotmail.com</email>
</author>
<published>2019-08-13T19:32:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=4a0328c92a818f8cc61271c2ef54e11018090960'/>
<id>urn:sha1:4a0328c92a818f8cc61271c2ef54e11018090960</id>
<content type='text'>
Summary:
As noted on Errc.h:

// * std::errc is just marked with is_error_condition_enum. This means that
//   common patters like AnErrorCode == errc::no_such_file_or_directory take
//   4 virtual calls instead of two comparisons.

And on some libstdc++ those virtual functions conclude that

------------------------
int main() {
  std::error_code foo = std::make_error_code(std::errc::no_such_file_or_directory);
  return foo == std::errc::no_such_file_or_directory;
}
-------------------------

should exit with 0.

Reviewers: thakis, rnk, jfb

Reviewed By: thakis

Subscribers: lebedev.ri, dexonsmith, xbolva00, cfe-commits, caomhin

Tags: #clang

Differential Revision: https://reviews.llvm.org/D66143

llvm-svn: 368739
</content>
</entry>
<entry>
<title>Don't diagnose errors when a file matches an include component</title>
<updated>2019-08-09T19:49:14+00:00</updated>
<author>
<name>Reid Kleckner</name>
<email>rnk@google.com</email>
</author>
<published>2019-08-09T19:49:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=50fcf7285eeb001d751eadac5d001a0e216fd701'/>
<id>urn:sha1:50fcf7285eeb001d751eadac5d001a0e216fd701</id>
<content type='text'>
This regressed in r368322, and was reported as PR42948 and on the
mailing list. The fix is to ignore the specific error code for this
case. The problem doesn't seem to reproduce on Windows, where a
different error code is used instead.

llvm-svn: 368475
</content>
</entry>
<entry>
<title>Fix up fd limit diagnosis code</title>
<updated>2019-08-08T21:35:03+00:00</updated>
<author>
<name>Reid Kleckner</name>
<email>rnk@google.com</email>
</author>
<published>2019-08-08T21:35:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=1d63b02f5305d18beca8945492b3775dc21ac0c7'/>
<id>urn:sha1:1d63b02f5305d18beca8945492b3775dc21ac0c7</id>
<content type='text'>
Apparently Windows returns the "invalid argument" error code when the
path contains invalid characters such as '&lt;'. The
test/Preprocessor/include-likely-typo.c test does this, so it was
failing after r368322.

Also, the diagnostic requires two arguments, so add the filename.

llvm-svn: 368348
</content>
</entry>
<entry>
<title>clang: Diag running out of file handles while looking for files</title>
<updated>2019-08-08T17:58:32+00:00</updated>
<author>
<name>Nico Weber</name>
<email>nicolasweber@gmx.de</email>
</author>
<published>2019-08-08T17:58:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=babdfdec90bb978799bcccf1ee0c856678b0ef7b'/>
<id>urn:sha1:babdfdec90bb978799bcccf1ee0c856678b0ef7b</id>
<content type='text'>
clang would only print "file not found" when it's unable to find a
header file.  If the reason for that is a file handle leak, that's not a
very useful error message.  For errors that aren't in a small whitelist
("file not found", "file is directory"), print an error with the
strerror() output.

This changes behavior in corner cases: If clang was out of file handles
while looking in one -I dir but then suddenly wasn't when looking in the
next -I dir, and both directories contained a file with the desired
name, previously we'd silently return the file from the second
directory. For this reason, it's important to ignore "is a directory"
for this new diag: if a file foo/foo exists and -I -Ifoo are passed, an
include of "foo" should successfully open file "foo" in directory "foo/"
instead of complaining that "./foo" is a directory.

No test since we mostly hit this when there's a handle leak somewhere,
and currently there isn't one. I manually tested this with the repro
steps in comment 2 on the bug below.

Fixes PR42524.

Differential Revision: https://reviews.llvm.org/D65956

llvm-svn: 368322
</content>
</entry>
<entry>
<title>[clang] Adopt new FileManager error-returning APIs</title>
<updated>2019-08-01T21:31:56+00:00</updated>
<author>
<name>Harlan Haskins</name>
<email>harlan@harlanhaskins.com</email>
</author>
<published>2019-08-01T21:31:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=8d323d150610bed1feeb79d7a29c9958a4c8bcac'/>
<id>urn:sha1:8d323d150610bed1feeb79d7a29c9958a4c8bcac</id>
<content type='text'>
Update the callers of FileManager::getFile and FileManager::getDirectory to handle the new llvm::ErrorOr-returning methods.

Signed-off-by: Harlan Haskins &lt;harlan@apple.com&gt;
llvm-svn: 367616
</content>
</entry>
</feed>
