The implementation also includes a Relax NG schema and tests for the schema
itself. The schema is used in c-index-test to verify that XML documents we
produce are valid. In order to do the validation, we add an optional libxml2
dependency for c-index-test.
Credits for CMake part go to Doug Gregor. Credits for Autoconf part go to Eric
Christopher. Thanks!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161431 91177308-0d34-0410-b5e6-96231b3b80d8
When creating the MCSubtargetInfo, the assembler driver uses the CPU and
feature string to construct a more accurate model of what instructions
are and are not legal.
rdar://10840476
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150273 91177308-0d34-0410-b5e6-96231b3b80d8
We don't actually need a separate flag for non-sysrooted paths as the
driver has to manage the sysroot anyways. The driver is not infrequently
adding paths to the header search based on their existence on the
filesystem. For that, it has to add the sysroot anyways, we should pass
it on down to CC1 already joined. More importantly, the driver cannot in
all cases distinguish between sysrooted paths and paths that are
relative to the Clang binary's installation directory. Essentially, we
always need to ignore the system root for these internal header search
options. It turns out in most of the places we were already providing
the system root in the driver, and then another one in CC1 so this fixes
several bugs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143917 91177308-0d34-0410-b5e6-96231b3b80d8
rather than presuming that it is 3.0. This is extra important as the
version should be 3.1, but CMake hasn't caught up with the times.
That'll be fixed in a separate commit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143823 91177308-0d34-0410-b5e6-96231b3b80d8
it the exact same way that the Clang code computes this path.
Hopefully with this, the MSVC bots will actually come back to life.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143807 91177308-0d34-0410-b5e6-96231b3b80d8
is a pretty gross hack, but I don't have any significantly cleaner ideas
for this. There are several things obviously gross about it:
1) Lit shouldn't know that Clang needs this. This really that bad, as
Lit already knows about CC1 and other internal details.
2) This hard codes the '3.0' version number, which is pretty lame.
3) This hard codes every other aspect of the resource dir structure
which is less lame than the version number, but still not great.
However, it should bring the MSVC tests back to life, and it should
unblock the rest of the move from Frontend to Driver, so I think it's
worth a bit of grossness that is isolated in our testing infrastructure
while we figure out the best long term approach. I have the following
ideas, some of which only solve part of the problem (and thus might need
to be combined with other ideas):
a) Create a symlink or other convenience path instead of a version
number.
b) Run 'clang' directly in the lit.cfg, look at its resource dir, and use
that.
c) Switch all the tests to use the driver instead of CC1.
d) Hack the frontend to synthesize builtin include directories when none
are provided by the driver.
I don't like (d) because it feels very hackish and likely to break. We
can only solve a small part of the problem with (a). I wanted to vote
for (c), but lots of the tests in this bucket are really heavily using
internal-only flags like -verify and -triple. I'm loath to complicate
them with the full driver layer. Also, switching them to the driver adds
more than just builtin headers, but all of the rest of the system
headers!
This leaves me with (b). If others like (b), I'll switch to it, but it
felt a bit icky. Nothing concrete, and the other options look
significantly worse, but I felt icky enough that I wanted to start with
a more brain-dead patch to stop the bleeding, and gauge others' feelings
here.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143804 91177308-0d34-0410-b5e6-96231b3b80d8
These tests have been failing since the beginning of buildbot time:
crash-recovery-code-complete.c
crash-recovery-reparse.c
crash-recovery.c
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138672 91177308-0d34-0410-b5e6-96231b3b80d8
Replace "clang++" with "clang\+\+" because we have to escape regexp
special characters now. This is in preparation for changes to lit to
fix PR8199. Tests will fail until the lit part gets committed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122753 91177308-0d34-0410-b5e6-96231b3b80d8
Handle %test_debuginfo on a RUN command line.
This set up now allows one to write small test cases to check debug info.
e.g.
; RUN: %clang -O0 -g %s -c -o %t.o
; RUN: %clang %t.o -o %t.out
; RUN: %test_debuginfo %s %t.out
define i32 @f1(i32 %i) nounwind ssp {
; DEBUGGER: break f1
; DEBUGGER: r
; DEBUGGER: p i
; CHECK: $1 = 42
entry:
%i.addr = alloca i32, align 4
...
...
}
It is also possible now to write test cases in c/c++.
The plan is to store these debug info testcases in a separate place.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113780 91177308-0d34-0410-b5e6-96231b3b80d8
Windows breaks things (because it pops up dialogs) since we don't have crash
recovery support there (yet).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111970 91177308-0d34-0410-b5e6-96231b3b80d8
- This is designed to make it obvious that %clang_cc1 is a "test variable"
which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it
can be useful to redefine what gets run as 'clang -cc1' (for example, to set
a default target).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91446 91177308-0d34-0410-b5e6-96231b3b80d8
- 'for i in $(find . -type f); do sed -e 's#\(RUN:.*[^ ]\) *&& *$#\1#g' $i | FileUpdate $i; done', for the curious.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86430 91177308-0d34-0410-b5e6-96231b3b80d8
- Move CMake to using the new test runner.
- Switch Makefiles to use the lit.site.cfg.in template.
- Remove explicit --path arguments, instead this gets written into the site
configuration. This means running lit from the command line should use the
exact same configuration as is used in 'make test', assuming it can find the
site configuration file. You still need to run 'make test' (or the cmake
build target equivalent) at least once.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82160 91177308-0d34-0410-b5e6-96231b3b80d8
- MultiTestRunner will eventually be renamed to 'lit', for LLVM integrated
tester/testing. This has the pros of being pronouncable and short.
- "Project" level configuration lives in 'lit.cfg', which is also what lit uses
to find the root testing directory in some cases. This can be overridden for
use in project files which want to precisely specify where things are.
- TestRunner.py is not longer able to be invoked directly.
- Moved some code to Util.py.
- Introduced a configuration object.
- Cleaned up --help, removed a few not-very-useful options.
- Tried not to break anything that works. :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77665 91177308-0d34-0410-b5e6-96231b3b80d8