summaryrefslogtreecommitdiff
path: root/examples
Commit message (Collapse)AuthorAge
* Eliminate DefaultImageName from the Driver constructorAlp Toker2014-05-15
| | | | | | | | | | | | All callers were passing in "a.out" or garbage so a sensible default works fine here as a cleanup. This also brings about the possibility of adapting the value based on the driver's compatibility mode in future. The setting can still be changed via Driver::DefaultImageName as needed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208926 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix build break, replace take() with release().Ahmed Charles2014-03-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203390 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Replace OwningPtr include with <memory>.Ahmed Charles2014-03-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203389 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Remove the remaining uses of OwningPtr.Ahmed Charles2014-03-09
| | | | | | Replace OwningArrayPtr with std::unique_ptr<T[]>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203388 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Get rid of explicit dependencies to include/clang/*.inc and ↵NAKAMURA Takumi2014-02-21
| | | | | | | | | | | | | | | | | | | introduce CLANG_TABLEGEN_TARGETS. This does; - clang_tablegen() adds each tblgen'd target to global property CLANG_TABLEGEN_TARGETS as list. - List of targets is added to LLVM_COMMON_DEPENDS. - all clang libraries and targets depend on generated headers. You might wonder this would be regression, but in fact, this is little loss. - Almost all of clang libraries depend on tblgen'd files and clang-tblgen. - clang-tblgen may cause short stall-out but doesn't cause unconditional rebuild. - Each library's dependencies to tblgen'd files might vary along headers' structure. It made hard to track and update *really optimal* dependencies. Each dependency to intrinsics_gen and ClangSACheckers is left as DEPENDS. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201842 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Fix installation without CLANG_BUILD_EXAMPLESJordan Rose2014-02-20
| | | | | | | | | | | | | | | | | | When CLANG_BUILD_EXAMPLES is not on we set the EXCLUDE_FROM_ALL directory property for the examples/ directory to tell CMake not to build them by default. The AddLLVM.cmake APIs are not aware of this and try to install targets that are not built. This does not cause an install-time error because CMake excludes the directory from the default installation. However, now that installation attaches targets to the LLVMExports export set CMake-based applications that find_package(LLVM) fail because the example plugin binary is not available. Tell the AddLLVM.cmake APIs to exclude the examples from installation by setting the EXCLUDE_FROM_ALL variable they check. Patch by Brad King! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201799 91177308-0d34-0410-b5e6-96231b3b80d8
* [examples] Add tablegen'd ClangCommentCommandList as a dependency for plugins.Jordan Rose2014-02-13
| | | | | | | | Also, remove library dependencies for the sample analyzer-plugin. The only library changes that would require a rebuild should be in headers, which should already implicitly be marked as dependencies. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201350 91177308-0d34-0410-b5e6-96231b3b80d8
* [examples] Use loadable modules instead of shared libraries for Clang plugins.Jordan Rose2014-02-12
| | | | | | This avoids linking in extra copies of, say, LLVMSupport. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201256 91177308-0d34-0410-b5e6-96231b3b80d8
* Expose the name of the checker producing each diagnostic message.Alexander Kornienko2014-02-11
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: In clang-tidy we'd like to know the name of the checker producing each diagnostic message. PathDiagnostic has BugType and Category fields, which are both arbitrary human-readable strings, but we need to know the exact name of the checker in the form that can be used in the CheckersControlList option to enable/disable the specific checker. This patch adds the CheckName field to the CheckerBase class, and sets it in the CheckerManager::registerChecker() method, which gets them from the CheckerRegistry. Checkers that implement multiple checks have to store the names of each check in the respective registerXXXChecker method. Reviewers: jordan_rose, krememek Reviewed By: jordan_rose CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2557 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201186 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Suppress SampleAnalyzerPlugin w/o ENABLE_STATIC_ANALYZER.NAKAMURA Takumi2014-01-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200532 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Parameterize MODULE and SHARED in add_clang_library().NAKAMURA Takumi2014-01-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199902 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use PrintFunctionNames.exports on Windows.Nico Weber2013-12-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198187 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typo in comment.Nico Weber2013-12-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198186 91177308-0d34-0410-b5e6-96231b3b80d8
* [cmake] Set in LLVM_EXPORTED_SYMBOL_FILE PrintFunctionNames/CMakeLists.txt.Nico Weber2013-12-29
| | | | | | | | The corresponding Makefile sets it too. Also tweak add_clang_library to support LLVM_EXPORTED_SYMBOL_FILE for modules. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198185 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix getCustomDiagID() usage in example codeAlp Toker2013-12-21
| | | | | | | This was setting a bad example. DiagIDs are a limited resource and the message argument is evaluated as a format string. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197855 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Update target_link_libraries() and LLVM_LINK_COMPONENTS for each ↵NAKAMURA Takumi2013-12-10
| | | | | | CMakeLists.txt. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196916 91177308-0d34-0410-b5e6-96231b3b80d8
* Add ObjCARCOpts to LINK_COMPONENTS.NAKAMURA Takumi2013-12-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196915 91177308-0d34-0410-b5e6-96231b3b80d8
* Add irreader to the component list, because ParseIR is called.Bill Wendling2013-10-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193032 91177308-0d34-0410-b5e6-96231b3b80d8
* Move Compilation::PrintJob and PrintDiagnosticJob into Job::Print.Hans Wennborg2013-09-12
| | | | | | | | | | | | | | | | | This moves the code to Job.cpp, which seems like a more natural fit, and replaces the "is this a JobList? is this a Command?" logic with a virtual function call. It also removes the code duplication between PrintJob and PrintDiagnosticJob and simplifies the code a little. There's no functionality change here, except that the Executable is now always printed within quotes, whereas it would previously not be quoted in crash reports, which I think was a bug. Differential Revision: http://llvm-reviews.chandlerc.com/D1653 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190620 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused header.Rafael Espindola2013-06-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184945 91177308-0d34-0410-b5e6-96231b3b80d8
* Use llvm::sys::fs::getMainExecutable.Rafael Espindola2013-06-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184915 91177308-0d34-0410-b5e6-96231b3b80d8
* Include PathV1.h only where it is used.Rafael Espindola2013-06-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184090 91177308-0d34-0410-b5e6-96231b3b80d8
* [Driver] Refactor clang driver to use LLVM's Option libraryReid Kleckner2013-06-14
| | | | | | | | | | | | | | | | | | The big changes are: - Deleting Driver/(Arg|Opt)* - Rewriting includes to llvm/Option/ and re-sorting - 'using namespace llvm::opt' in clang::driver - Fixing the autoconf build by adding option everywhere As discussed in the review, this change includes using directives in header files. I'll make follow up changes to remove those in favor of name specifiers. Reviewers: espindola Differential Revision: http://llvm-reviews.chandlerc.com/D975 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183989 91177308-0d34-0410-b5e6-96231b3b80d8
* The IRReader header is now part of its own library. Update the includeChandler Carruth2013-03-26
| | | | | | line and the library dependencies to reflect this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177972 91177308-0d34-0410-b5e6-96231b3b80d8
* Nuke SetUpBuildDumpLog.Sean Silva2013-01-20
| | | | | | | Also, it was the only reason that `argc` and `argv` were being passed into createDiagnostics, so remove those parameters and clean up callers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172945 91177308-0d34-0410-b5e6-96231b3b80d8
* Use getProcessTriple in clang-interpreter.Peter Collingbourne2013-01-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172664 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove useless 'llvm::' qualifier from names like StringRef and others that areDmitri Gribenko2013-01-12
| | | | | | | brought into 'clang' namespace by clang/Basic/LLVM.h git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172323 91177308-0d34-0410-b5e6-96231b3b80d8
* Rewrite #includes for llvm/Foo.h to llvm/IR/Foo.h as appropriate toChandler Carruth2013-01-02
| | | | | | | | reflect the migration in r171366. Re-sort the #include lines to reflect the new paths. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171369 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r170801, which breaks the mingw build.Douglas Gregor2012-12-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170804 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate errors when running the 'PrintFunctionNames' plugin, from Li Qun!Douglas Gregor2012-12-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170801 91177308-0d34-0410-b5e6-96231b3b80d8
* Sort the #include lines for examples/...Chandler Carruth2012-12-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169241 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix examples.Rafael Espindola2012-11-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168705 91177308-0d34-0410-b5e6-96231b3b80d8
* analyzer-plugin/MainCallChecker.cpp: Fixup corresponding to r167275.NAKAMURA Takumi2012-11-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167278 91177308-0d34-0410-b5e6-96231b3b80d8
* Update clang-interpreter exampleDouglas Gregor2012-10-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166510 91177308-0d34-0410-b5e6-96231b3b80d8
* Split library clangRewrite into clangRewriteCore and clangRewriteFrontend.Ted Kremenek2012-09-01
| | | | | | | This is similar to how we divide up the StaticAnalyzer libraries to separate core functionality to what is clearly associated with Frontend actions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163050 91177308-0d34-0410-b5e6-96231b3b80d8
* libclang, examples: [CMake] Add dependencies to tblgen'd headers.NAKAMURA Takumi2012-07-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160849 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove a goofy CMake hack and use the standard CMake facilities toChandler Carruth2012-06-21
| | | | | | | | | express library-level dependencies within Clang. This is no more verbose really, and plays nicer with the rest of the CMake facilities. It should also have no change in functionality. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158888 91177308-0d34-0410-b5e6-96231b3b80d8
* Honour CLANG_BUILD_EXAMPLES correctly, by setting the directory'sPeter Collingbourne2012-05-03
| | | | | | EXCLUDE_FROM_ALL property. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156090 91177308-0d34-0410-b5e6-96231b3b80d8
* Reverted unintentional commit.Manuel Klimek2012-04-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155629 91177308-0d34-0410-b5e6-96231b3b80d8
* Adds a small tutorial on how to write RAV based ASTFrontendActions.Manuel Klimek2012-04-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155627 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove clangIndex reference from clang-interpreter CMake buildDouglas Gregor2012-04-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154674 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-interpreter/Makefile: [PR12313] Update USEDLIBS to add clangEdit.NAKAMURA Takumi2012-03-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153167 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove clang-wpa example, which has been unmaintained for quite a while.Douglas Gregor2012-03-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152729 91177308-0d34-0410-b5e6-96231b3b80d8
* Unify naming of LangOptions variable/get function across the Clang stack ↵David Blaikie2012-03-11
| | | | | | | | | | (Lex to AST). The member variable is always "LangOpts" and the member function is always "getLangOpts". Reviewed by Chris Lattner git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152536 91177308-0d34-0410-b5e6-96231b3b80d8
* [analyzer] Rename clang::CallGraph into clang::idx::CallGraph + renameAnna Zaks2012-03-02
| | | | | | | | | | | | | the corresponding files to avoid confusion. This is a preparation to adding an AST-based call graph to Analysis. The existing call graph works with indexer entries. We might be able to refactor it to use the AST based graph in the future. (Minimal testing here as the only example that uses the API has been completely broken, does not compile.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151950 91177308-0d34-0410-b5e6-96231b3b80d8
* Basic: import IntrusiveRefCntPtr<> into clang namespaceDylan Noblesmith2012-02-20
| | | | | | | The class name is long enough without the llvm:: added. Also bring in RefCountedBase and RefCountedBaseVPTR. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150958 91177308-0d34-0410-b5e6-96231b3b80d8
* drop more llvm:: prefixes on SmallString<>Dylan Noblesmith2012-02-13
| | | | | | More cleanup after r149799. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150380 91177308-0d34-0410-b5e6-96231b3b80d8
* drop more llvm:: prefixes on OwningPtr<>Dylan Noblesmith2012-02-13
| | | | | | More cleanup after r149798. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150379 91177308-0d34-0410-b5e6-96231b3b80d8
* examples/analyzer-plugin: hook up to buildDylan Noblesmith2012-02-13
| | | | | | | | | | | This was never being compiled at all and was bitrotting as a result. Also compile SampleAnalyzerPlugin as a module, not a library, and fix a mistake with not passing the source files to add_clang_library(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150378 91177308-0d34-0410-b5e6-96231b3b80d8
* examples/analyzer-plugin/: unbreak buildDylan Noblesmith2012-02-09
| | | | | | | It was never updated for API changes in r149311/r149336/r149339 and r147688. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150202 91177308-0d34-0410-b5e6-96231b3b80d8