were being treated as type names for non-Objective-C files.
- Other lines are just because MinimalAction didn't have access to
the LangOptions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58498 91177308-0d34-0410-b5e6-96231b3b80d8
playground to experiment with some new rewriter approaches. For now
it is probably the most complex version of 'cat' ever invented.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57406 91177308-0d34-0410-b5e6-96231b3b80d8
both Preprocessor and ASTContext, we no longer need to explicitly pass
MainFileID around in function calls that also pass either Preprocessor or
ASTContext. This resulted in some nice cleanups in the ASTConsumers and the
driver.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45228 91177308-0d34-0410-b5e6-96231b3b80d8
and into the "Basic" library. TargetInfo objects are now
constructed from triples by calling the static method
TargetInfo::CreateTargetInfo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44940 91177308-0d34-0410-b5e6-96231b3b80d8
SourceManager is passed by reference, allowing the SourceManager to be
associated with a specific translation unit, and not the entire execution
of the driver.
Modified all users of Diagnostics to comply with this new interface.
Integrated SourceManager as a member variable of TargetInfo. TargetInfo will
eventually be associated with a single translation unit (just like
SourceManager).
Made the SourceManager reference in ASTContext private. Provided accessor
getSourceManager() for clients to use instead. Modified clients to comply with
new interface.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44878 91177308-0d34-0410-b5e6-96231b3b80d8
Modified: ctor of SerializationTest: Now takes LangOptions argument. We
will eventually serialize this as well.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44630 91177308-0d34-0410-b5e6-96231b3b80d8
replaces the functionality previously provided by just "-arch" (which is still
supported but has different semantics).
The new behavior is as follows:
(1) If the user does not specify -triple:
(a) If no -arch options are specified, the target triple used is the host
triple (in llvm/Config/config.h).
(b) If one or more -arch's are specified (and no -triple), then there is
one triple for each -arch, where the specified arch is substituted
for the arch in the host triple. Example:
host triple = i686-apple-darwin9
command: clang -arch ppc -arch ppc64 ...
triples used: ppc-apple-darwin9 ppc64-apple-darwin9
(2) The user does specify a -triple (only one allowed):
(a) If no -arch options are specified, the triple specified by -triple
is used. E.g clang -triple i686-apple-darwin9
(b) If one or more -arch options are specified, then the triple specified
by -triple is used as the primary target, and the arch's specified
by -arch are used to create secondary targets. For example:
clang -triple i686-apple-darwin9 -arch ppc -arch ppc64
has the following targets:
i686-apple-darwin9 (primary target)
ppc-apple-darwin9
ppc64-apple-darwin9
Other changes related to the changes to the driver:
- TargetInfoImpl now includes the triple string.
- TargetInfo::getTargetTriple returns the triple for its primary target.
- test case test/Parser/portability.c has been updated because "-arch linux" is
no longer valid ("linux" is an OS, not an arch); instead we use a bogus
architecture "bogusW16W16" where WCharWidth=16 and WCharAlign=16.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44551 91177308-0d34-0410-b5e6-96231b3b80d8
ASTConsumer can also be verified using the diagnostics checker. From
the command line, users may activate diagnostic checking using the
"-verify" option. For example, "clang -verify -warn-dead-stores"
checks if the warnings flagged by the dead store checker match those
in the comments.
Note that we still have the option "-parse-ast-check" for backwards
comptability with existing test cases. This option is now equivalent to
"-parse-ast -verify".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42362 91177308-0d34-0410-b5e6-96231b3b80d8
"CheckDiagnostics" (used for -parse-ast-check) to check the
diagnostics of any ASTConsumer.
Reimplemented CheckDiagnostics to use CheckASTConsumer instead.
Added driver option -warn-dead-stores-check, which checks the
diagnostics generated by the DeadStores checker. This is implemented
using CheckASTConsumer.111
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42310 91177308-0d34-0410-b5e6-96231b3b80d8