<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/clang.git/lib/Basic/SourceManager.cpp, branch master</title>
<subtitle>llvm.org: Obsolete (use llvm)
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/clang.git/'/>
<entry>
<title>ASTReader: Bypass overridden files when reading PCHs</title>
<updated>2019-08-30T22:59:25+00:00</updated>
<author>
<name>Duncan P. N. Exon Smith</name>
<email>dexonsmith@apple.com</email>
</author>
<published>2019-08-30T22:59:25+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/clang.git/commit/?id=1d98bab4c4d1810b10e329ad3d185334a4320121'/>
<id>1d98bab4c4d1810b10e329ad3d185334a4320121</id>
<content type='text'>
If contents of a file that is part of a PCM are overridden when reading
it, but weren't overridden when the PCM was being built, the ASTReader
will emit an error.  Now it creates a separate FileEntry for recovery,
bypassing the overridden content instead of discarding it.  The
pre-existing testcase clang/test/PCH/remap-file-from-pch.cpp confirms
that the new recovery method works correctly.

This resolves a long-standing FIXME to avoid hypothetically invalidating
another precompiled module that's already using the overridden contents.

This also removes ContentCache-related API that would be unsafe to use
across `CompilerInstance`s in an implicit modules build.  This helps to
unblock us sinking it from SourceManager into FileManager in the future,
which would allow us to delete `InMemoryModuleCache`.

https://reviews.llvm.org/D66710

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@370546 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If contents of a file that is part of a PCM are overridden when reading
it, but weren't overridden when the PCM was being built, the ASTReader
will emit an error.  Now it creates a separate FileEntry for recovery,
bypassing the overridden content instead of discarding it.  The
pre-existing testcase clang/test/PCH/remap-file-from-pch.cpp confirms
that the new recovery method works correctly.

This resolves a long-standing FIXME to avoid hypothetically invalidating
another precompiled module that's already using the overridden contents.

This also removes ContentCache-related API that would be unsafe to use
across `CompilerInstance`s in an implicit modules build.  This helps to
unblock us sinking it from SourceManager into FileManager in the future,
which would allow us to delete `InMemoryModuleCache`.

https://reviews.llvm.org/D66710

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@370546 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>ContentCache: Drop getBuffer's dependency on SourceManager</title>
<updated>2019-08-26T20:32:05+00:00</updated>
<author>
<name>Duncan P. N. Exon Smith</name>
<email>dexonsmith@apple.com</email>
</author>
<published>2019-08-26T20:32:05+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/clang.git/commit/?id=6d8783fabd3a11785025e88a77b9efebec624f30'/>
<id>6d8783fabd3a11785025e88a77b9efebec624f30</id>
<content type='text'>
Refactor ContentCache::IsSystemFile to IsFileVolatile, checking
SourceManager::userFilesAreVolatile at construction time.  This is a
step toward lowering ContentCache down from SourceManager to
FileManager.

No functionality change intended.

https://reviews.llvm.org/D66713

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@369958 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Refactor ContentCache::IsSystemFile to IsFileVolatile, checking
SourceManager::userFilesAreVolatile at construction time.  This is a
step toward lowering ContentCache down from SourceManager to
FileManager.

No functionality change intended.

https://reviews.llvm.org/D66713

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@369958 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</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='http://91.123.203.49/cgit/delta/clang.git/commit/?id=5195a35aa7c12eab8cf35edefd0208dc0ddcde00'/>
<id>5195a35aa7c12eab8cf35edefd0208dc0ddcde00</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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@369680 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@369680 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>NFCI: Simplify SourceManager::translateFile by removing code path that should never be taken</title>
<updated>2019-08-21T21:37:09+00:00</updated>
<author>
<name>Alex Lorenz</name>
<email>arphaman@gmail.com</email>
</author>
<published>2019-08-21T21:37:09+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/clang.git/commit/?id=d1cb18cc31e9ba4926dd020af716b287bd0b63a7'/>
<id>d1cb18cc31e9ba4926dd020af716b287bd0b63a7</id>
<content type='text'>
I noticed that SourceManager::translateFile has code that doesn't really make sense.
In particular, if it fails to find a FileID by comparing FileEntry * values, it tries to
look through files that have the same filename, to see if they have a matching inode to try to
find the right FileID. However, the inode comparison seem redundant, as Clang's FileManager
already deduplicates FileEntry * values by inode.
Thus the comparisons between inodes should never actually succeed, and the comparison between FileEntry * values should be sufficient here.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@369585 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I noticed that SourceManager::translateFile has code that doesn't really make sense.
In particular, if it fails to find a FileID by comparing FileEntry * values, it tries to
look through files that have the same filename, to see if they have a matching inode to try to
find the right FileID. However, the inode comparison seem redundant, as Clang's FileManager
already deduplicates FileEntry * values by inode.
Thus the comparisons between inodes should never actually succeed, and the comparison between FileEntry * values should be sufficient here.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@369585 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>[Clang] Migrate llvm::make_unique to std::make_unique</title>
<updated>2019-08-14T23:04:18+00:00</updated>
<author>
<name>Jonas Devlieghere</name>
<email>jonas@devlieghere.com</email>
</author>
<published>2019-08-14T23:04:18+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/clang.git/commit/?id=49a6b091014f0033829e099ea7ac50bc7b6e9c32'/>
<id>49a6b091014f0033829e099ea7ac50bc7b6e9c32</id>
<content type='text'>
Now that we've moved to C++14, we no longer need the llvm::make_unique
implementation from STLExtras.h. This patch is a mechanical replacement
of (hopefully) all the llvm::make_unique instances across the monorepo.

Differential revision: https://reviews.llvm.org/D66259

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@368942 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that we've moved to C++14, we no longer need the llvm::make_unique
implementation from STLExtras.h. This patch is a mechanical replacement
of (hopefully) all the llvm::make_unique instances across the monorepo.

Differential revision: https://reviews.llvm.org/D66259

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@368942 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</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='http://91.123.203.49/cgit/delta/clang.git/commit/?id=43696f88090b4e80468c1f91161767a7a7c43db9'/>
<id>43696f88090b4e80468c1f91161767a7a7c43db9</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;

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@367616 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@367616 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>Use a unique_ptr instead of manual memory management for LineTable</title>
<updated>2019-07-15T17:27:46+00:00</updated>
<author>
<name>Nico Weber</name>
<email>nicolasweber@gmx.de</email>
</author>
<published>2019-07-15T17:27:46+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/clang.git/commit/?id=18638574119e6afbc124ebb439564db903ff4086'/>
<id>18638574119e6afbc124ebb439564db903ff4086</id>
<content type='text'>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@366088 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@366088 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix MSVC "signed/unsigned mismatch" warning. NFCI.</title>
<updated>2019-07-03T10:26:28+00:00</updated>
<author>
<name>Simon Pilgrim</name>
<email>llvm-dev@redking.me.uk</email>
</author>
<published>2019-07-03T10:26:28+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/clang.git/commit/?id=ee915ad903e0d476c07d0398b42b2970a4dc4b19'/>
<id>ee915ad903e0d476c07d0398b42b2970a4dc4b19</id>
<content type='text'>
Fixes PR42426.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@365019 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes PR42426.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@365019 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>Change std::{lower,upper}_bound to llvm::{lower,upper}_bound or llvm::partition_point. NFC</title>
<updated>2019-07-03T08:13:17+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>maskray@google.com</email>
</author>
<published>2019-07-03T08:13:17+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/clang.git/commit/?id=b76b345fe11bc58f9e5037556f1a46b890d41cbf'/>
<id>b76b345fe11bc58f9e5037556f1a46b890d41cbf</id>
<content type='text'>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@365006 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@365006 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>PR42301: Abort cleanly if we encounter a huge source file rather than</title>
<updated>2019-06-21T20:46:22+00:00</updated>
<author>
<name>Richard Smith</name>
<email>richard-llvm@metafoo.co.uk</email>
</author>
<published>2019-06-21T20:46:22+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/clang.git/commit/?id=ce328ca3cafdc3f4e9166a581b8882b5e4962167'/>
<id>ce328ca3cafdc3f4e9166a581b8882b5e4962167</id>
<content type='text'>
crashing.

Ideally we wouldn't care about the size of a file so long as it fits in
memory, but in practice we have lots of hardocded assumptions that
unsigned can be used to index files, string literals, and so on.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@364103 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
crashing.

Ideally we wouldn't care about the size of a file so long as it fits in
memory, but in practice we have lots of hardocded assumptions that
unsigned can be used to index files, string literals, and so on.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@364103 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
</feed>
