History log of /llvm-project/clang/lib/Frontend/CompilerInstance.cpp (Results 401 – 425 of 684)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# cb69b57b 07-Mar-2014 Ben Langmuir <blangmuir@apple.com>

Add dependencies from imported modules with -MD

Add module dependencies to the dependency files created by -MD/-MMD/etc.
by attaching an ASTReaderListener that will call into the dependency
file gen

Add dependencies from imported modules with -MD

Add module dependencies to the dependency files created by -MD/-MMD/etc.
by attaching an ASTReaderListener that will call into the dependency
file generator when a module input file is seen in the serialized AST.

llvm-svn: 203208

show more ...


# 841f1c78 04-Mar-2014 Richard Smith <richard-llvm@metafoo.co.uk>

[C++11] Simplify a callback to use a lambda.

llvm-svn: 202897


# bbdd7640 01-Mar-2014 Benjamin Kramer <benny.kra@googlemail.com>

[C++11] Replace verbose functors with succinct lambdas

No functionality change.

llvm-svn: 202590


# 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 ...


# 1b7ed91e 27-Feb-2014 Argyrios Kyrtzidis <akyrtzi@gmail.com>

[ASTUnit] Fix use-after-free bug in ASTUnit::getMainBufferWithPrecompiledPreamble().

With r197755 we started reading the contents of buffer file entries, but the
buffers may point to ASTReader blobs

[ASTUnit] Fix use-after-free bug in ASTUnit::getMainBufferWithPrecompiledPreamble().

With r197755 we started reading the contents of buffer file entries, but the
buffers may point to ASTReader blobs that have been disposed.

Fix this by having the CompilerInstance object keep a reference to the ASTReader
as well as having the ASTContext keep reference to the ExternalASTSource.

This was very difficult to construct a test case for.
rdar://16149782

llvm-svn: 202346

show more ...


# 4fbd3738 24-Feb-2014 Rafael Espindola <rafael.espindola@gmail.com>

Update for llvm api change.

llvm-svn: 202053


# c8130a74 20-Feb-2014 Ben Langmuir <blangmuir@apple.com>

Recommit virtual file system

Previously reverted in r201755 due to causing an assertion failure.

I've removed the offending assertion, and taught the CompilerInstance to
create a default virtual fi

Recommit virtual file system

Previously reverted in r201755 due to causing an assertion failure.

I've removed the offending assertion, and taught the CompilerInstance to
create a default virtual file system inside createFileManager. In the
future, we should be able to reach into the CompilerInvocation to
customize this behaviour without breaking clients that don't care.

llvm-svn: 201818

show more ...


# a32575e4 20-Feb-2014 Juergen Ributzka <juergen@apple.com>

Reverting the virtual file system implementation, because it triggers an assertion
in our internal build bots.

This reverts commits 201618, 201635, 201636, 201639, 201685, 201691, and 201696.

llvm-

Reverting the virtual file system implementation, because it triggers an assertion
in our internal build bots.

This reverts commits 201618, 201635, 201636, 201639, 201685, 201691, and 201696.

llvm-svn: 201755

show more ...


# b50b23f9 19-Feb-2014 Ben Langmuir <blangmuir@apple.com>

Pass VFS from CompilerInstance to FileManager

This change was somehow missed from r201618

llvm-svn: 201636


# 090610d3 19-Feb-2014 Ben Langmuir <blangmuir@apple.com>

Initial implementation of virtual file system

This adds the minimum virtual file system support to start migrating
FileManager onto the VFS.

Originally discussed here:
http://lists.cs.uiuc.edu/pipe

Initial implementation of virtual file system

This adds the minimum virtual file system support to start migrating
FileManager onto the VFS.

Originally discussed here:
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-February/035188.html

Differential Revision: http://llvm-reviews.chandlerc.com/D2745

llvm-svn: 201618

show more ...


# f430da4d 12-Feb-2014 Dmitri Gribenko <gribozavr@gmail.com>

Add an option to allow Clang verify source files for a module only once during
the build

When Clang loads the module, it verifies the user source files that the module
was built from. If any file w

Add an option to allow Clang verify source files for a module only once during
the build

When Clang loads the module, it verifies the user source files that the module
was built from. If any file was changed, the module is rebuilt. There are two
problems with this:
1. correctness: we don't verify system files (there are too many of them, and
stat'ing all of them would take a lot of time);
2. performance: the same module file is verified again and again during a
single build.

This change allows the build system to optimize source file verification. The
idea is based on the fact that while the project is being built, the source
files don't change. This allows us to verify the module only once during a
single build session. The build system passes a flag,
-fbuild-session-timestamp=, to inform Clang of the time when the build started.
The build system also requests to enable this feature by passing
-fmodules-validate-once-per-build-session. If these flags are not passed, the
behavior is not changed. When Clang verifies the module the first time, it
writes out a timestamp file. Then, when Clang loads the module the second
time, it finds a timestamp file, so it can compare the verification timestamp
of the module with the time when the build started. If the verification
timestamp is too old, the module is verified again, and the timestamp file is
updated.

llvm-svn: 201224

show more ...


# 3d4417c7 07-Feb-2014 Ben Langmuir <blangmuir@apple.com>

Stat system dependencies when using -verify-pch

We don't stat the system headers to check for stalenes during regular
PCH loading for performance reasons. When explicitly saying
-verify-pch, we wan

Stat system dependencies when using -verify-pch

We don't stat the system headers to check for stalenes during regular
PCH loading for performance reasons. When explicitly saying
-verify-pch, we want to check all the dependencies - user or system.

llvm-svn: 200979

show more ...


# 2cb4a78f 05-Feb-2014 Ben Langmuir <blangmuir@apple.com>

Add a CC1 option -verify-pch

This option will:
- load the given pch file
- verify it is not out of date by stat'ing dependencies, and
- return 0 on success and non-zero on error

llvm-svn: 200884


# 9eb229bf 22-Jan-2014 Ben Langmuir <blangmuir@apple.com>

Require a module.map file to load a module

Removes some old code that allowed a module to be loaded from a pcm file
even if the module.map could not be found. Also update a number of
tests that rel

Require a module.map file to load a module

Removes some old code that allowed a module to be loaded from a pcm file
even if the module.map could not be found. Also update a number of
tests that relied on the old behavior.

llvm-svn: 199852

show more ...


# 2a008784 10-Jan-2014 Rafael Espindola <rafael.espindola@gmail.com>

Use the simpler version of llvm::sys::fs::remove when possible.

llvm-svn: 198957


Revision tags: llvmorg-3.4.0
# 0761a8a0 17-Dec-2013 Daniel Jasper <djasper@google.com>

Modules: Don't warn upon missing headers while reading the module map.

Instead, mark the module as unavailable so that clang errors as soon as
someone tries to build this module.

This works towards

Modules: Don't warn upon missing headers while reading the module map.

Instead, mark the module as unavailable so that clang errors as soon as
someone tries to build this module.

This works towards the long-term goal of not stat'ing the header files at all
while reading the module map and instead read them only when the module is
being built (there is a corresponding FIXME in parseHeaderDecl()). However, it
seems non-trivial to get there and this unblock us and moves us into the right
direction.

Also changed the implementation to reuse the same DiagnosticsEngine.

llvm-svn: 197485

show more ...


Revision tags: llvmorg-3.4.0-rc3, llvmorg-3.4.0-rc2, llvmorg-3.4.0-rc1
# a3feee2a 28-Oct-2013 Richard Smith <richard-llvm@metafoo.co.uk>

Allow a new syntax in a module requires-declaration:

requires ! feature

The purpose of this is to allow (for instance) the module map for /usr/include
to exclude <tgmath.h> and <complex.h> when b

Allow a new syntax in a module requires-declaration:

requires ! feature

The purpose of this is to allow (for instance) the module map for /usr/include
to exclude <tgmath.h> and <complex.h> when building in C++ (these headers are
instead provided by the C++ standard library in this case, and the glibc C
<tgmath.h> header would otherwise try to include <complex.h>, resulting in a
module cycle).

llvm-svn: 193549

show more ...


# 1f76c4e8 24-Oct-2013 Manuel Klimek <klimek@google.com>

Use the same SourceManager for ModuleMaps and compilations.

This allows using virtual file mappings on the original SourceManager to
map in virtual module.map files. Without this patch, the ModuleMa

Use the same SourceManager for ModuleMaps and compilations.

This allows using virtual file mappings on the original SourceManager to
map in virtual module.map files. Without this patch, the ModuleMap
search will find a module.map file (as the FileEntry exists in the
FileManager), but will be unable to get the content from the
SourceManager (as ModuleMap previously created its own SourceManager).

Two problems needed to be fixed which this patch exposed:

1. Storing the inferred module map
When writing out a module, the ASTWriter stores the names of the files
in the main source manager; when loading the AST again, the ASTReader
errs out if such a file is found missing, unless it is overridden.
Previously CompilerInstance's compileModule method would store the
inferred module map to a temporary file; the problem with this approach
is that now that the module map is handled by the main source manager,
the ASTWriter stores the name of the temporary module map as source to
the compilation; later, when the module is loaded, the temporary file
has already been deleted, which leads to a compilation error. This patch
changes the inferred module map to instead inject a virtual file into
the source manager. This both saves some disk IO, and works with how the
ASTWriter/ASTReader handle overridden source files.

2. Changing test input in test/Modules/Inputs/*
Now that the module map file is handled by the main source manager, the
VerifyDiagnosticConsumer will not ignore diagnostics created while
parsing the module map file. The module test test/Modules/renamed.m uses
-I test/Modules/Inputs and triggers recursive loading of all module maps
in test/Modules/Inputs, some of which had conflicting names, thus
leading errors while parsing the module maps. Those diagnostics already
occur on trunk, but before this patch they would not break the test, as
they were ignored by the VerifyDiagnosticConsumer. This patch thus
changes the module maps that have been recently introduced which broke
the invariant of compatible modules maps in test/Modules/Inputs.

llvm-svn: 193314

show more ...


# 92304e00 18-Oct-2013 Richard Smith <richard-llvm@metafoo.co.uk>

Fix crash if a submodule @imports another submodule from the same module. The
test also adds FIXMEs for a number of places where imports and includes of
submodules don't work very well.

llvm-svn: 19

Fix crash if a submodule @imports another submodule from the same module. The
test also adds FIXMEs for a number of places where imports and includes of
submodules don't work very well.

llvm-svn: 193005

show more ...


# 963ff2c3 17-Sep-2013 Eli Friedman <eli.friedman@gmail.com>

Fix potential race in module building code.

Let the module building code handle the case of overwriting an existing file
itself, so the existing locking infrastructure works correctly.

<rdar://prob

Fix potential race in module building code.

Let the module building code handle the case of overwriting an existing file
itself, so the existing locking infrastructure works correctly.

<rdar://problem/14403381>

llvm-svn: 190833

show more ...


# 3841fa38 12-Aug-2013 Benjamin Kramer <benny.kra@googlemail.com>

SourceManager intialization tweaks.

- Open files before calling stat on them.
- Go through FileManager for getting the buffer of named pipes. It has the
necessary plumbing to deal with "volatile"

SourceManager intialization tweaks.

- Open files before calling stat on them.
- Go through FileManager for getting the buffer of named pipes. It has the
necessary plumbing to deal with "volatile" files.
- Print the cause when stdin reading fails. The only case I can imagine where
this happens is when stdin is wired to a device file, so no test case.

llvm-svn: 188178

show more ...


# 0fd6207d 09-Aug-2013 Hans Wennborg <hans@hanshq.net>

clang-cl: Support /showIncludes

This option prints information about #included files to stderr. Clang could
already do it, this patch just teaches the existing code about the /showIncludes
style and

clang-cl: Support /showIncludes

This option prints information about #included files to stderr. Clang could
already do it, this patch just teaches the existing code about the /showIncludes
style and adds the flag.

Differential Revision: http://llvm-reviews.chandlerc.com/D1333

llvm-svn: 188037

show more ...


# a07f720a 17-Jul-2013 Rafael Espindola <rafael.espindola@gmail.com>

Use the simpler is_directory.

llvm-svn: 186487


# 16125fb6 16-Jul-2013 Rafael Espindola <rafael.espindola@gmail.com>

Update for llvm API change.

llvm-svn: 186448


Revision tags: llvmorg-3.3.1-rc1
# 18627115 05-Jul-2013 Rafael Espindola <rafael.espindola@gmail.com>

Use llvm::sys::fs::createUniqueFile.

Include a test that clang now produces output files with permissions matching
the umask.

llvm-svn: 185727


1...<<11121314151617181920>>...28