History log of /llvm-project/clang/lib/Basic/FileManager.cpp (Results 126 – 150 of 245)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# e50371b9 07-Jul-2015 Adrian Prantl <aprantl@apple.com>

Wrap clang modules and pch files in an object file container.
This patch adds ObjectFilePCHContainerOperations uses the LLVM backend
to put the contents of a PCH into a __clangast section inside a CO

Wrap clang modules and pch files in an object file container.
This patch adds ObjectFilePCHContainerOperations uses the LLVM backend
to put the contents of a PCH into a __clangast section inside a COFF, ELF,
or Mach-O object file container.

This is done to facilitate module debugging by makeing it possible to
store the debug info for the types defined by a module alongside the AST.

rdar://problem/20091852

llvm-svn: 241620

show more ...


Revision tags: llvmorg-3.6.2, llvmorg-3.6.2-rc1, llvmorg-3.6.1, llvmorg-3.6.1-rc1
# 92e1b62d 18-Mar-2015 Yaron Keren <yaron.keren@gmail.com>

Remove many superfluous SmallString::str() calls.

Now that SmallString is a first-class citizen, most SmallString::str()
calls are not required. This patch removes a whole bunch of them, yet
there a

Remove many superfluous SmallString::str() calls.

Now that SmallString is a first-class citizen, most SmallString::str()
calls are not required. This patch removes a whole bunch of them, yet
there are lots more.

There are two use cases where str() is really needed:
1) To use one of StringRef member functions which is not available in
SmallString.
2) To convert to std::string, as StringRef implicitly converts while
SmallString do not. We may wish to change this, but it may introduce
ambiguity.

llvm-svn: 232622

show more ...


Revision tags: llvmorg-3.5.2, llvmorg-3.5.2-rc1, llvmorg-3.6.0, llvmorg-3.6.0-rc4, llvmorg-3.6.0-rc3, llvmorg-3.6.0-rc2, llvmorg-3.6.0-rc1, llvmorg-3.5.1, llvmorg-3.5.1-rc2
# 54cc3c2f 11-Dec-2014 Richard Smith <richard-llvm@metafoo.co.uk>

[modules] When constructing paths relative to a module, strip out /./ directory
components. These sometimes get synthetically added, and we don't want -Ifoo
and -I./foo to be treated fundamentally di

[modules] When constructing paths relative to a module, strip out /./ directory
components. These sometimes get synthetically added, and we don't want -Ifoo
and -I./foo to be treated fundamentally differently here.

llvm-svn: 224055

show more ...


Revision tags: llvmorg-3.5.1-rc1
# 13156b68 19-Nov-2014 David Blaikie <dblaikie@gmail.com>

Standardize on StringMap::insert, removing uses of StringMap::GetOrCreateValue.

llvm-svn: 222306


# a885796d 26-Oct-2014 Benjamin Kramer <benny.kra@googlemail.com>

Make VFS and FileManager match the current MemoryBuffer API.

This eliminates converting back and forth between the 3 formats and
gives us a more homogeneous interface.

llvm-svn: 220657


# ab86fbe4 08-Sep-2014 Ben Langmuir <blangmuir@apple.com>

Make FileEntry::getName() valid across calls to FileManager::getFile()

Because we may change the name of a FileEntry inside getFile, the name
returned by FileEntry::getName() could be destroyed. Th

Make FileEntry::getName() valid across calls to FileManager::getFile()

Because we may change the name of a FileEntry inside getFile, the name
returned by FileEntry::getName() could be destroyed. This was causing a
use-after-free when searching the HeaderFileInfo on-disk hashtable for a
module or pch.

llvm-svn: 217385

show more ...


Revision tags: llvmorg-3.5.0, llvmorg-3.5.0-rc4
# 6406f7b8 26-Aug-2014 Rafael Espindola <rafael.espindola@gmail.com>

Return a std::unique_ptr from getBufferForFile. NFC.

llvm-svn: 216476


Revision tags: llvmorg-3.5.0-rc3
# c0ff9908 13-Aug-2014 Manuel Klimek <klimek@google.com>

Default getFile() to use the last accessed name in the FileEntry.

With modules we start accessing headers for the first time while reading
the module map, which often has very different paths from t

Default getFile() to use the last accessed name in the FileEntry.

With modules we start accessing headers for the first time while reading
the module map, which often has very different paths from the include
scanning logic.

Using the name by which the file was accessed gets us one step closer to
the right solution, which is using a FileName abstraction that decouples
the name by which a file was accessed from the FileEntry.

llvm-svn: 215541

show more ...


# 23430ccb 11-Aug-2014 David Blaikie <dblaikie@gmail.com>

unique_ptr-ify FileSystemStatCache::setNextStatCache

And in the process, discover that FileManager::removeStatCache had a
double-delete when removing an element from the middle of the list (at
the b

unique_ptr-ify FileSystemStatCache::setNextStatCache

And in the process, discover that FileManager::removeStatCache had a
double-delete when removing an element from the middle of the list (at
the beginning or the end of the list, there was no problem) and add a
unit test to exercise the code path (which successfully crashed when run
(with modifications to match the old API) without this patch applied)

llvm-svn: 215388

show more ...


# dd0e1e8d 10-Aug-2014 David Blaikie <dblaikie@gmail.com>

unique_ptr-ify FileSystemStatCache::takeNextStatCache

llvm-svn: 215318


Revision tags: llvmorg-3.5.0-rc2, llvmorg-3.5.0-rc1
# 3875a82d 19-Jul-2014 David Blaikie <dblaikie@gmail.com>

Remove uses of the redundant ".reset(nullptr)" of unique_ptr, in favor of ".reset()"

It's also possible to just write "= nullptr", but there's some question
of whether that's as readable, so I leave

Remove uses of the redundant ".reset(nullptr)" of unique_ptr, in favor of ".reset()"

It's also possible to just write "= nullptr", but there's some question
of whether that's as readable, so I leave it up to authors to pick which
they prefer for now. If we want to discuss standardizing on one or the
other, we can do that at some point in the future.

llvm-svn: 213439

show more ...


# 326ffb36 08-Jul-2014 David Blaikie <dblaikie@gmail.com>

Improve memory ownership of vfs::Files in the FileSystemStatCache by using std::unique_ptr

Spotted after a memory leak (due to the complexities of manual memory
management) was fixed in 212466.

llv

Improve memory ownership of vfs::Files in the FileSystemStatCache by using std::unique_ptr

Spotted after a memory leak (due to the complexities of manual memory
management) was fixed in 212466.

llvm-svn: 212541

show more ...


# 221285bd 07-Jul-2014 Alp Toker <alp@nuanti.com>

Remove unused sys/stat.h includes

The facility was abstracted to LLVM in r187364.

llvm-svn: 212441


# 9801b253 20-Jun-2014 Ben Langmuir <blangmuir@apple.com>

Avoid invalidating successfully loaded module files

Successfully loaded module files may be referenced in other
ModuleManagers, so don't invalidate them. Two related things are fixed:

1) I thought

Avoid invalidating successfully loaded module files

Successfully loaded module files may be referenced in other
ModuleManagers, so don't invalidate them. Two related things are fixed:

1) I thought the last module in the manager was always the one that
failed, but it isn't. So check explicitly against the list of
vetted modules from ReadASTCore.

2) We now keep the file descriptor of pcm file open, which avoids the
possibility of having two different pcms for the same module loaded when
building in parallel with headers being modified during a build.

<rdar://problem/16835846>

llvm-svn: 211330

show more ...


# 8a8e554a 12-Jun-2014 Rafael Espindola <rafael.espindola@gmail.com>

Include system_error directly.

llvm-svn: 210802


# c080917e 12-Jun-2014 Rafael Espindola <rafael.espindola@gmail.com>

Replace llvm::error_code with std::error_code.

llvm-svn: 210780


# 5de00f3b 23-May-2014 Ben Langmuir <blangmuir@apple.com>

Stopgap fix for finding module for a file mapped in the VFS

If we lookup a path using its 'real' path first, we need to ensure that
when we run header search we still use the VFS-mapped path or we w

Stopgap fix for finding module for a file mapped in the VFS

If we lookup a path using its 'real' path first, we need to ensure that
when we run header search we still use the VFS-mapped path or we will
not be able to find the corresponding module for the header.

The real problem is that we tie the name of a file to its underlying
FileEntry, which is uniqued by inode, so we only ever get the first name
it is looked up by. This doesn't work with modules, which rely on a
specific file system structure. I'm hoping to have time to write up a
proposal for fixing this more permanently soon, but as a stopgap this
patch updates the name of the file's directory if it comes from a VFS
mapping.

llvm-svn: 209534

show more ...


Revision tags: llvmorg-3.4.2, llvmorg-3.4.2-rc1
# f1186c5a 08-May-2014 Craig Topper <craig.topper@gmail.com>

[C++11] Use 'nullptr'.

llvm-svn: 208280


# 26d56393 05-May-2014 Argyrios Kyrtzidis <akyrtzi@gmail.com>

[Basic/FileManager] Propagate whether a file 'IsVolatile' to the file opening functions.

Needs llvm r208007.

llvm-svn: 208008


Revision tags: llvmorg-3.4.1, llvmorg-3.4.1-rc2, llvmorg-3.4.1-rc1
# b8984329 07-Mar-2014 Ahmed Charles <ahmedcharles@gmail.com>

Replace OwningPtr with std::unique_ptr.

This compiles cleanly with lldb/lld/clang-tools-extra/llvm.

llvm-svn: 203279


# 9a16beb8 07-Mar-2014 Ahmed Charles <ahmedcharles@gmail.com>

Change OwningPtr::take() to OwningPtr::release().

This is a precursor to moving to std::unique_ptr.

llvm-svn: 203275


# d066d4c8 28-Feb-2014 Ben Langmuir <blangmuir@apple.com>

Reapply fixed "Honour 'use-external-names' in FileManager"

Was r202442

There were two issues with the original patch that have now been fixed.
1. We were memset'ing over a FileEntry in a test case.

Reapply fixed "Honour 'use-external-names' in FileManager"

Was r202442

There were two issues with the original patch that have now been fixed.
1. We were memset'ing over a FileEntry in a test case. After adding a
std::string to FileEntry, this still happened to not break for me.
2. I didn't pass the FileManager into the new compiler instance in
compileModule. This was hidden in some cases by the fact I didn't
clear the module cache in the test.

Also, I changed the copy constructor for FileEntry, which was memcpy'ing
in a (now) unsafe way.

llvm-svn: 202539

show more ...


# 1b8d44f5 27-Feb-2014 Ben Langmuir <blangmuir@apple.com>

Revert "Honour 'use-external-names' in FileManager"

Revert r202442, which broke the buildbots.

llvm-svn: 202443


# 09e0d5c1 27-Feb-2014 Ben Langmuir <blangmuir@apple.com>

Honour 'use-external-names' in FileManager

Pass through the externally-visible names that we got from the VFS down
to FileManager, and test that this is the name showing up in __FILE__,
diagnostics,

Honour 'use-external-names' in FileManager

Pass through the externally-visible names that we got from the VFS down
to FileManager, and test that this is the name showing up in __FILE__,
diagnostics, and debug information.

llvm-svn: 202442

show more ...


# c9b7234e 27-Feb-2014 Ben Langmuir <blangmuir@apple.com>

Reapply r202420 hopefully fixed for other STLs

Keep the copy constructor around, and add a FIXME that we should really
remove it as soon as we have C++11 std::map's emplace function.

llvm-svn: 2024

Reapply r202420 hopefully fixed for other STLs

Keep the copy constructor around, and add a FIXME that we should really
remove it as soon as we have C++11 std::map's emplace function.

llvm-svn: 202439

show more ...


12345678910