aboutsummaryrefslogtreecommitdiff
path: root/Driver/clang.cpp
AgeCommit message (Collapse)Author
2008-10-29Choose CompileOptions (optimization passes) to match llvm-gcc moreDaniel Dunbar
closely. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58361 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-28.s files don't require the preprocessor, patch by Roman Divacky!Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58349 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-28Call llvm_shutdown() on (normal) termination. This makes --time-passes usable.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58308 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-27With -verify, only exit early on failure.Daniel Dunbar
- Nice if -verify test exercise the various cleanup functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58285 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-27Remove unneeded CheckASTConsumer function.Daniel Dunbar
- No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58282 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-25Use string literal for format string specifier; this prevents ErrMsg from ↵Ted Kremenek
being interpretted as a format string specifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58150 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-24Add initial dependency file generation support. Patch by KovarththananDaniel Dunbar
Rajaratnam, with some updates and formatting changes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58122 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-24Make the analyzer store (memory model) a command line option.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58056 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-23Added driver option "-cxx-inheritance-view" for viewing the C++ hierarchy of ↵Ted Kremenek
a class in GraphViz. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58051 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-23Add -O[0-3s] support (following llvm-gcc).Daniel Dunbar
- Passes match llvm-gcc but many of the switches aren't wired. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58034 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-22Add support for assembler-with-cpp (preprocessed .S files), patch byChris Lattner
Roman Divacky! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57988 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-21[LLVM up] Add basic -S option to clang.Daniel Dunbar
- Split backend related consumer out into Backend.cpp, replaces LLVMCodeGenWriter. - Structure follows llvm-gcc to some extent. - Still need to implement all the options which impact code generation and the optimization passes which llvm-gcc uses at various levels. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57936 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-21Fix <rdar://problem/6261178> clang-on-xcode: [sema] multiple method warning ↵Steve Naroff
is over enthusiastic. Fix <rdar://problem/6265257> warnings for ambiguous message send swamp other warnings. Reworked Sema::MatchTwoMethodDeclarations() to optionally match based on method size and alignment (the default in GCC). Changed Sema::LookupInstanceMethodInGlobalPool() to use this feature. Added -Wno-struct-selector-match to driver, however didn't hook it up yet. Added a FIXME that says this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57898 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-21Added the start of a prototype implementation of PCH based on token caching.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57863 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-16Add --disable-free flag to clang.Daniel Dunbar
- Disables the freeing of the ASTContext and the TranslationUnit after parsing & sema. - Primarily for timing the impact on -fsyntax-only timings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57643 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-12Add a new -rewrite-test option, which is basically a Chris Lattner
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
2008-10-12Add a new -dump-raw-tokens option, which allows us to see raw tokens. Chris Lattner
Rename -dumptokens to -dump-tokens. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57405 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-10Disable blocks support in C++ mode.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57334 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-05Allow -verify to be used with -rewrite-macros.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57093 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-04Set exit code properly on "Unexpected program action".Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57080 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-02(llvm up) If the target triple is unspecified, automatically set theDaniel Dunbar
OS version part to that of the host on darwin. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56943 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-02Drop code to validate OS part of target triple on darwin, too fragile.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56941 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-30Fix help for --suppress-system-warningsDaniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56878 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-30Handle minor version numbers in __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__Chris Lattner
like "10.3.9" git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56873 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-30Finish handling of -mmacosx-version-min. If you now do something like:Chris Lattner
clang -mmacosx-version-min=10.4.9 ... you'll end up with a target triple like "i686-apple-darwin8.9". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56871 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-30start handling 'mmacosx-version-min', this is not complete yet.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56828 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-18Add driver support for invoking block rewriter.Steve Naroff
Also tweaked the create function to take an explicit output file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56305 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-12Add --suppress-system-warnings (on by default, use =0 to disable)Daniel Dunbar
- For investigating warnings in system headers / builtins. - Currently also enables the behavior that allows silent redefinition of types in system headers. Conceptually these are separate but I didn't feel it was worth two options (or changing LangOptions). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56163 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-11LangOptions.C99 should be false in C++.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56092 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-03Following gcc's behavior, only enable trigraphs if '-trigraphs' or '-ansi' isTed Kremenek
specified, or -std is set to a conforming mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55738 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-27Added Ubigraph visualization for the static analyzer (this is pretty alpha ↵Ted Kremenek
quality). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55442 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-24Moved HTMLDiagnostics to lib/Driver.Zhongxing Xu
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55274 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-23Add TargetInfo::useNeXTRuntimeAsDefaultDaniel Dunbar
- Used to autoselect runtime when neither -fnext-runtime nor -fgnu-runtime is specified. - Default impl is false, all darwin targets set it to true. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55231 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-22Move most of HeaderSearch initialization to libDriver.Nico Weber
For example, adding the default system include paths in clients is now as simple as InitHeaderSearch init(headers); init.AddDefaultSystemIncludePaths(langopts); init.Realize(); git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55174 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-11Add LangOptions::NeXTRuntime.Daniel Dunbar
- Wired to -fnext-runtime and -fgnu-runtime options. - Defaults to GNU, no autoselection for NeXT. Emit NeXT OBJC_IMAGE_INFO marker. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54651 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-11Add -fexceptions to DriverDaniel Dunbar
- Maps to LangOptions.Exceptions - Currently always off, should autoselect based on language. Update CodeGen to set unwind attribute on functions definitions based on LangOptions.Exceptions. - Still need to set attributes appropriately on calls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54643 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-11More #include cleaningDaniel Dunbar
- Drop Expr.h,RecordLayout.h from ASTContext.h (for DeclBase.h and SourceLocation.h) - Move ASTContext constructor into implementation git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54627 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-10* Remove isInSystemHeader() from DiagClient, move it to SourceManagerNico Weber
* Move FormatError() from TextDiagnostic up to DiagClient, remove now empty class TextDiagnostic * Make DiagClient optional for Diagnostic This fixes the following problems: * -html-diags (and probably others) does now output the same set of warnings as console clang does * nothing crashes if one forgets to call setHeaderSearch() on TextDiagnostic * some code duplication is removed git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54620 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-08ParseAST now never releases the passed ASTConsumer. This is the ↵Ted Kremenek
responsibility of the client. The motivation is that clients may either: (a) query the ASTConsumer object after AST parsing to collect data/etc. (b) reuse the ASTConsumer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54502 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-07Remove unneeded #includes.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54478 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-07Micro cleanups.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54477 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-07Fix --html-diags in driver by delaying the construction of an ↵Ted Kremenek
HTMLDiagnosticClient until after we have created the Preprocessor object. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54472 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-05add a libDriver, for now only move the text diangostics stuff from Driver to ↵Nico Weber
there git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54383 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-05Refactored driver logic for CodeGen into LLVMCodeGenWriter. This ↵Ted Kremenek
ASTConsumer layers on top of LLVMCodeGen (another existing ASTConsumer) to emit bitcode files to disk. This layering takes this logic out of clang.cpp and puts it directly into the ASTConsumer interface. The benefit is that now --emit-llvm works with both serialized ASTs and regular source files. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54364 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-24"This patch adds paths for Fedora 9 in clang.cpp and support for two ↵Ted Kremenek
preprocessor options in ccc." Patch by Zhongxing Xu! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53976 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-18Prevent clang from emitting output when input has errorsDaniel Dunbar
+ test case <rdar://problem/6080040> http://llvm.org/bugs/show_bug.cgi?id=2280 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53756 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-15Provide an "Analysis Scope" for Analyses so checks can either be run on code ↵Ted Kremenek
declarations (bodies) or Objective-C @implementation blocks. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53584 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-14Break off declaration of Analysis enum into Analyses.def. The driver options inTed Kremenek
clang.cpp now #include these definitions to create the command line options, and AnalysisConsumer #includes this file to generate the switch statement to create actions. Renamed -check-objc-methodsigs to -warn-objc-methodsigs. The "missing -dealloc" check is now optional: -warn-objc-missing-dealloc git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53575 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-11Add new check: -check-objc-methodsigs. This check scans methods inTed Kremenek
ObjCImplementationDecls and sees if a ancestor class defines a method with the same selector but with a different type signature. Right now it just compares return types, and mainly looks at differences in primitive values. The checking will be expanded in the future. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53482 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-05add gentoo stable gcc headers path so that all tests pass here (CPATH isnt ↵Nuno Lopes
enough..) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53143 91177308-0d34-0410-b5e6-96231b3b80d8