Commit Graph

2917 Commits

Author SHA1 Message Date
Aaron Ballman 91cdc28d93 [C++11] Replacing UsingDecl iterators shadow_begin() and shadow_end() with iterator_range shadows(). Updating all of the usages of the iterators with range-based for loops.
llvm-svn: 203825
2014-03-13 18:07:29 +00:00
Aaron Ballman 0ad78303de [C++11] Replacing CXXRecordDecl iterators init_begin() and init_end() with iterator_range inits(). Updating all of the usages of the iterators with range-based for loops.
llvm-svn: 203819
2014-03-13 17:34:31 +00:00
Aaron Ballman 574705ed7f [C++11] Replacing CXXRecordDecl iterators bases_begin() and bases_end() with iterator_range bases(). Updating all of the usages of the iterators with range-based for loops.
llvm-svn: 203803
2014-03-13 15:41:46 +00:00
Justin Bogner d66a17d0a3 Revert "CodeGen: Use a binary format for instrumentation based profiling"
I've clearly done something wrong with how to get this to link
correctly. Reverting for now.

This reverts commit r203711.

llvm-svn: 203712
2014-03-12 21:06:31 +00:00
Justin Bogner ff9a058267 CodeGen: Use a binary format for instrumentation based profiling
This updates CodeGenPGO to use the ProfileDataReader introduced to
llvm in r203703 and the new API for writing out the profile introduced
to compiler-rt in r203710.

llvm-svn: 203711
2014-03-12 20:53:16 +00:00
Hans Wennborg 501eadb429 Check for LLVM_ON_WIN32 instead of _WIN32.
This is a follow-up to r203624 to address Anton's comment.

llvm-svn: 203668
2014-03-12 16:07:46 +00:00
Dmitri Gribenko 340dd5193d Use vector<T>::data() to simplify code
llvm-svn: 203665
2014-03-12 15:35:53 +00:00
Hans Wennborg ae1c5a88f4 Be case sensitive when determining driver mode based on argv[0] except on Windows
This narrows the impact of r188833 after Dimitry pointed out that it's good to be
able to tell the difference between 'cc' and 'CC'.

llvm-svn: 203624
2014-03-11 23:42:29 +00:00
Ahmed Charles f9e1e5f8de Add a main function to the clang-format.py vim integration.
This will allow using an early return statement in a subsequent change.

llvm-svn: 203501
2014-03-10 22:12:14 +00:00
Rafael Espindola a7a94d10ea Replace CLANG_IS_PRODUCTION with CLANG_PLUGIN_SUPPORT.
llvm-svn: 203473
2014-03-10 17:00:46 +00:00
Ahmed Charles dfca6f97bc [C++11] Replace OwningPtr include with <memory>.
llvm-svn: 203389
2014-03-09 11:36:40 +00:00
Aaron Ballman b97112e4bd [C++11] Replacing Decl iterators attr_begin() and attr_end() with iterator_range attrs(). Updating all of the usages of the iterators with range-based for loops.
This is a reapplication of r203236 with modifications to the definition of attrs() and following the new style guidelines on auto usage.

llvm-svn: 203362
2014-03-08 22:19:01 +00:00
Aaron Ballman e8a8baef44 [C++11] Replacing RecordDecl iterators field_begin() and field_end() with iterator_range fields(). Updating all of the usages of the iterators with range-based for loops.
llvm-svn: 203355
2014-03-08 20:12:42 +00:00
Rafael Espindola 181d29782e Add an option to disable plugins in clang.
An option with the same name already exists in the makefile build.

The name CLANG_IS_PRODUCTION is historical. We should probably change it, but
should change the configure build at the same time.

llvm-svn: 203325
2014-03-08 01:19:37 +00:00
Rafael Espindola bc28340573 Revert "Add an option to disable plugins in clang."
This reverts commit r203320.

There is some order dependency going on that I missed.

llvm-svn: 203321
2014-03-08 00:41:53 +00:00
Rafael Espindola 8c49cd1b06 Add an option to disable plugins in clang.
An option with the same name already exists in the makefile build.

llvm-svn: 203320
2014-03-08 00:33:15 +00:00
Benjamin Kramer 4cadf292a5 [C++11] Revert uses of lambdas with array_pod_sort.
Looks like GCC implements the lambda->function pointer conversion differently.

llvm-svn: 203293
2014-03-07 21:51:58 +00:00
Benjamin Kramer 15ae783e14 [C++11] Convert sort predicates into lambdas.
No functionality change.

llvm-svn: 203289
2014-03-07 21:35:40 +00:00
Ahmed Charles b89843299a Replace OwningPtr with std::unique_ptr.
This compiles cleanly with lldb/lld/clang-tools-extra/llvm.

llvm-svn: 203279
2014-03-07 20:03:18 +00:00
Aaron Ballman 629afaefe0 [C++11] Replacing DeclBase iterators decls_begin() and decls_end() with iterator_range decls(). The same is true for the noload versions of these APIs. Updating all of the usages of the iterators with range-based for loops.
llvm-svn: 203278
2014-03-07 19:56:05 +00:00
Ahmed Charles 9a16beb8bc Change OwningPtr::take() to OwningPtr::release().
This is a precursor to moving to std::unique_ptr.

llvm-svn: 203275
2014-03-07 19:33:25 +00:00
Aaron Ballman 43b68bebe7 [C++11] Replacing ObjCMethodDecl iterators param_begin() and param_end() with iterator_range params(). Updating all of the usages of the iterators with range-based for loops.
llvm-svn: 203255
2014-03-07 17:50:17 +00:00
Aaron Ballman f6bf62e2d0 [C++11] Replacing FunctionDecl iterators param_begin() and param_end() with iterator_range params(). Updating all of the usages of the iterators with range-based for loops.
llvm-svn: 203248
2014-03-07 15:12:56 +00:00
Aaron Ballman 7dce1a840c Fully reverting r203236 -- it seems the only bots that are happy are the MSVC bots.
llvm-svn: 203237
2014-03-07 13:13:38 +00:00
Aaron Ballman 690829696c [C++11] Replacing iterators attr_begin() and attr_end() with iterator_range attrs(). Updating all of the usages of the iterators with range-based for loops.
llvm-svn: 203236
2014-03-07 12:50:00 +00:00
Richard Smith 131daca01d Remove a dead store, add a FIXME for another.
llvm-svn: 203169
2014-03-06 21:59:38 +00:00
Alexey Bataev 568a833f68 [OPENMP] Clause 'num_threads'
llvm-svn: 203087
2014-03-06 06:15:19 +00:00
Jordan Rose af71031e3c Fix -Wsign-compare warning.
No functionality change.

llvm-svn: 202864
2014-03-04 17:45:43 +00:00
Chandler Carruth 757fcd6d1f [cleanup] Re-sort includes with llvm/utils/sort_includes.py and fix
a missing include from CLog.h.

CLog.h referenced most of the core libclang types but never directly
included Index.h that provides them. Previously it got lucky and other
headers were always included first but with the sorting it ended up
first in one case and stopped compiling. Adding the Index.h include
fixes it right up.

llvm-svn: 202810
2014-03-04 10:05:20 +00:00
Argyrios Kyrtzidis 3227d86f1b [libclang] Have clang_getCursorSpelling() return the string for a CXCursor_ObjCStringLiteral or CXCursor_StringLiteral cursor.
rdar://16206459

llvm-svn: 202745
2014-03-03 19:40:52 +00:00
Jordan Rose 7ef1c387a0 Serialized diagnostic severity levels should be stable.
Serialized diagnostics were accidentally using the AST diagnostic level values
rather than a dedicated stable enum, so the addition of "remark" broke the
reading of existing serialized diagnostics files. I've added a .dia file
generated from Xcode 5's Clang to make sure we don't break this in the future.

llvm-svn: 202733
2014-03-03 18:29:52 +00:00
Argyrios Kyrtzidis d502a10c5e [libclang] Introduce APIs that assist in constructing a simple module.map file for a user framework.
rdar://16092858

llvm-svn: 202681
2014-03-03 07:41:45 +00:00
Argyrios Kyrtzidis 74c96c0c75 [libclang] Change clang_VirtualFileOverlay_writeToBuffer to return a malloc'ed buffer.
Returning CXString is not appropriate if we want to switch to a non-string format buffer.

llvm-svn: 202675
2014-03-03 06:38:52 +00:00
Benjamin Kramer 4527fb2f33 [C++11] Use std::atomic instead of LLVM's.
No intended functionality change.

llvm-svn: 202652
2014-03-02 17:08:31 +00:00
Benjamin Kramer 867ea1d426 [C++11] Replace llvm::tie with std::tie.
llvm-svn: 202639
2014-03-02 13:01:17 +00:00
Craig Topper a798a9db93 Switch all uses of LLVM_OVERRIDE to just use 'override' directly.
llvm-svn: 202625
2014-03-02 09:32:10 +00:00
Benjamin Kramer bbdd7640e8 [C++11] Replace verbose functors with succinct lambdas
No functionality change.

llvm-svn: 202590
2014-03-01 14:48:57 +00:00
Rafael Espindola d0151cebcf Now that llvm's build system sets -install_name, we don't need to.
llvm-svn: 202500
2014-02-28 13:50:15 +00:00
Tobias Grosser 741602461d Add 'remark' diagnostic type in 'clang'
A 'remark' is information that is not an error or a warning, but rather some
additional information provided to the user. In contrast to a 'note' a 'remark'
is an independent diagnostic, whereas a 'note' always depends on another
diagnostic.

A typical use case for remark nodes is information provided to the user, e.g.
information provided by the vectorizer about loops that have been vectorized.

This patch provides the initial implementation of 'remarks'. It includes the
actual definiton of the remark nodes, their printing as well as basic parameter
handling. We are reusing the existing diagnostic parameters which means a remark
can be enabled with normal '-Wdiagnostic-name' flags and can be upgraded to
an error using '-Werror=diagnostic-name'. '-Werror' alone does not upgrade
remarks.

This patch is by intention minimal in terms of parameter handling. More
experience and more discussions will most likely lead to further enhancements
in the parameter handling.

llvm-svn: 202475
2014-02-28 09:11:08 +00:00
Dmitri Gribenko 6ede6aba28 libclang: New functions clang_Type_getNumTemplateArguments,
clang_Type_getTemplateArgument

Note that these functions don't handle variadic templates -- see tests.

Patch by Matthieu Nottale and Philippe Daouadi.

llvm-svn: 202406
2014-02-27 16:05:05 +00:00
Alexey Bataev 1b59ab5683 [OPENMP] First changes for Parsing and Sema for 'omp simd' directive support
llvm-svn: 202360
2014-02-27 08:29:12 +00:00
Alexander Kornienko 1eda305a52 Add newlines to fallback-style description. Patch by Kamal Essoufi\!
llvm-svn: 202269
2014-02-26 15:03:57 +00:00
Ted Kremenek 38d77473b0 Add preprocessed output to ccc-analyzer's accepted language map.
llvm-svn: 202182
2014-02-25 19:16:33 +00:00
Argyrios Kyrtzidis 0b9682efa4 [libclang] Introduce libclang APIs for creating a buffer with a JSON virtual file overlay description.
The current API only supports adding 'virtual file path' -> 'real file path' mappings.

rdar://15986708

llvm-svn: 202105
2014-02-25 03:59:23 +00:00
Rafael Espindola 4fbd373815 Update for llvm api change.
llvm-svn: 202053
2014-02-24 18:20:21 +00:00
Bob Wilson 39265b96b5 Remove support for the QA_OVERRIDE_GCC3_OPTIONS environment variable.
In r199283 I switched the name of this variable to CCC_OVERRIDE_OPTIONS, but
I kept some code to continue recognizing the old name temporarily. As far as
I know, the only use of this was for some internal testing at Apple, and we've
now switched to use the new name. If anyone else is still using this and needs
more time to switch names, I guess we'll find out! <rdar://problem/15821425>

llvm-svn: 201962
2014-02-23 00:11:56 +00:00
NAKAMURA Takumi 959c64bb76 [CMake] libclang: Use llvm_add_library(SHARED STATIC).
llvm-svn: 201862
2014-02-21 15:34:01 +00:00
NAKAMURA Takumi 7da9487dd4 [CMake] Get rid of explicit dependencies to include/clang/*.inc and 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.

llvm-svn: 201842
2014-02-21 07:59:59 +00:00
Dmitri Gribenko 8850cdad34 libclang: ensure clang_createTranslationUnit2 always initializes *TU
llvm-svn: 201657
2014-02-19 10:24:00 +00:00
Saleem Abdulrasool 909dce5fe2 CIndex: initialise TU
TU is not guaranteed to be initialised in all cases.  In particular if CIdx or
ast_filename is NULL (or if &TU is NULL), then clang_createTranslationUnit2 will
not initialise the out parameter out_TU.  This is followed by an assertion check
which may perform a branch based on unitialised memory.

Caught by scan-build.

llvm-svn: 201628
2014-02-19 02:56:55 +00:00