| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 210423
|
|
|
|
|
|
|
|
|
|
|
|
| |
This corrects long-standing misuses of LLVM's internal config.h.
In most cases the public llvm-config.h header was intended and we can now
remove the old hacks thanks to LLVM r210144.
The config.h header is private, won't be installed and should no longer be
included by clang or other modules.
llvm-svn: 210145
|
|
|
|
| |
llvm-svn: 209959
|
|
|
|
| |
llvm-svn: 209956
|
|
|
|
|
|
|
|
|
|
|
| |
Eliminate createMainFileID() / createMainFileIDForMemBuffer() utility
functions. These didn't add much convenience and conflated two distinct
operations.
This change makes things easier to follow by providing a consistent interface
and getting rid of a bunch of cast-to-voids.
llvm-svn: 209266
|
|
|
|
|
|
| |
Landing this separately to make the previous commits easy to follow at home.
llvm-svn: 207826
|
|
|
|
|
|
|
|
| |
The Preprocessor::Initialize() function already offers a clear interface to
achieve this, further reducing the confusing number of states a newly
constructed preprocessor can have.
llvm-svn: 207825
|
|
|
|
| |
llvm-svn: 207011
|
|
|
|
|
|
| |
symbols in non-imported modules.
llvm-svn: 206977
|
|
|
|
|
|
| |
This is a follow-up to r203624 to address Anton's comment.
llvm-svn: 203668
|
|
|
|
|
|
| |
This compiles cleanly with lldb/lld/clang-tools-extra/llvm.
llvm-svn: 203279
|
|
|
|
|
|
|
| |
Using a //net/ path to hopefully avoid problems with non-absolute paths
on Windows.
llvm-svn: 203010
|
|
|
|
|
|
|
|
|
|
|
| |
Failing Tests (5):
Clang-Unit :: Basic/BasicTests.exe/VFSFromYAMLTest.CaseInsensitive
Clang-Unit :: Basic/BasicTests.exe/VFSFromYAMLTest.MappedFiles
Clang-Unit :: Basic/BasicTests.exe/VFSFromYAMLTest.MultiComponentPath
Clang-Unit :: Basic/BasicTests.exe/VFSFromYAMLTest.TrailingSlashes
Clang-Unit :: Basic/BasicTests.exe/VFSFromYAMLTest.UseExternalName
llvm-svn: 202952
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Revert r202442, which broke the buildbots.
llvm-svn: 202443
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When true, sets the name of the file to be the name from
'external-contents'. Otherwise, you get the virtual path that the file
was looked up by. This will not affect any non-virtual paths, or fully
virtual paths (for which there is no reasonable 'external' name anyway).
The setting is available globally, but can be overriden on a per-file
basis.
The goal is that this setting will control which path you see in debug
info, diagnostics, etc. which are sensitive to which path is used. That
will come in future patches that pass the name through to FileManager.
llvm-svn: 202329
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows the 'name' field to contain a path, like
{ 'type': 'directory',
'name': '/path/to/dir',
'contents': [ ... ] }
which not only simplifies reading and writing these files (for humans),
but makes it possible to easily modify locations via textual
replacement, which would not have worked in the old scheme.
E.g. sed s:<ROOT>:<NEW ROOT>
llvm-svn: 202109
|
|
|
|
|
|
|
| |
As requested during review, compare pointers to NULL explicitly to make what's
going on more clear.
llvm-svn: 202090
|
|
|
|
|
|
|
| |
This allows the unit tests to not use global state when checking
diagnostics.
llvm-svn: 202072
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Provides a way to create a virtual file system using a YAML file that
supports mapping a file to a path on an 'external' file system. The
external file system will typically be the 'real' file system, but for
testing it can be changed.
A future patch will add a clang option to allow the user to specify such
a file and overlay it, but for now this code is only exercised by the
unit tests.
Differential Revision: http://llvm-reviews.chandlerc.com/D2835
llvm-svn: 201905
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
assertion
in our internal build bots.
This reverts commits 201618, 201635, 201636, 201639, 201685, 201691, and 201696.
llvm-svn: 201755
|
|
|
|
|
|
| |
Use camel-case names, remove some dead code, and fix a copy-and-pasted test.
llvm-svn: 201691
|
|
|
|
|
|
|
|
| |
Explicit operator bool doesn't not play nicely with gtest assertion
macros (i.e. it performs as advertised and I wish that gtest subverted
it for me).
llvm-svn: 201639
|
|
|
|
|
|
|
| |
Provides a way to merge multiple vfs::FileSystem objects into a single
filesystem.
llvm-svn: 201635
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
CMakeLists.txt.
llvm-svn: 196916
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This unifies the unix and windows versions of FileManager::UniqueDirContainer
and FileManager::UniqueFileContainer by using UniqueID.
We cannot just replace "struct stat" with llvm::sys::fs::file_status, since we
want to be able to construct fake ones, and file_status has different members
on unix and windows.
What the patch does is:
* Record only the information that clang is actually using.
* Use llvm::sys::fs::status instead of stat and fstat.
* Use llvm::sys::fs::UniqueID
* Delete the old windows versions of UniqueDirContainer and
UniqueFileContainer since the "unix" one now works on windows too.
llvm-svn: 187619
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On windows, c:foo is a valid file path, but stat fails on just "c:". This
causes a problem for clang since its file manager wants to cache data about
the parent directory.
There are refactorings to be done in here, but this gives clang the correct
behavior and testing first.
Patch by Yunzhong Gao!
llvm-svn: 187359
|
|
|
|
|
|
|
|
| |
MacroArgs object that provides information about
the argument tokens for a function macro.
llvm-svn: 181065
|
|
|
|
|
|
| |
and warn when a newly-imported module conflicts with an already-imported module.
llvm-svn: 177577
|
|
|
|
|
|
|
|
| |
available the
full information about the macro (e.g if it was imported and where).
llvm-svn: 175978
|
|
|
|
|
|
|
| |
Nearly all of these changes are one-to-one replacements; the few that
aren't have to do with custom identifier validation.
llvm-svn: 174768
|
|
|
|
|
|
|
|
|
|
|
| |
Rewriting the same predicates over and over again is bad for code size and
code maintainence. Using the functions in <ctype.h> is generally unsafe
unless they are specified to be locale-independent (i.e. only isdigit and
isxdigit).
The next commit will try to clean up uses of <ctype.h> functions within Clang.
llvm-svn: 174765
|
|
|
|
|
|
| |
module import occurred.
llvm-svn: 174191
|
|
|
|
| |
llvm-svn: 172295
|
|
|
|
|
|
|
|
|
|
| |
a file or directory, allowing just a stat call if a file descriptor
is not needed.
Doing just 'stat' is faster than 'open/fstat/close'.
This has the effect of cutting down system time for validating the input files of a PCH.
llvm-svn: 169831
|
|
|
|
|
|
| |
I've tried to place sensible headers at the top as main-module headers.
llvm-svn: 169243
|
|
|
|
| |
llvm-svn: 168962
|
|
|
|
| |
llvm-svn: 168137
|
|
|
|
| |
llvm-svn: 166599
|
|
|
|
| |
llvm-svn: 166584
|
|
|
|
| |
llvm-svn: 166511
|
|
|
|
| |
llvm-svn: 166509
|
|
|
|
| |
llvm-svn: 166079
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The fundamental change is to put a CMakeLists.txt file in the unittest
directory, with a single test binary produced from it. This has several
advantages.
Among other fundamental advantages, we start to get the checking logic
for when a file is missing from the CMake build, and this caught one
missing file already! More fun details in the LLVM commit corresponding
to this one.
Note that the LLVM commit and this one most both be applied, or neither.
Sorry for any skew issues.
llvm-svn: 158910
|
|
|
|
|
|
|
| |
It turns out SourceManager treating the "one-past-the-end" location as invalid,
but then failing to set the invalid flag properly.
llvm-svn: 158699
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
expansions, e.g
"#include MACRO(STUFF)".
-As an inclusion position for the included file, use the file location of the file where it
was included but *after* the macro expansions. We want the macro expansions to be considered
as before-in-translation-unit for everything in the included file.
-In the preprocessing record take into account that only inclusion directives can be encountered
as "out-of-order" (by comparing the start of the range which for inclusions is the hash location)
and use binary search if there is an extreme number of macro expansions in the include directive.
Fixes rdar://11111779
llvm-svn: 153527
|