summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Improve ownership of ASTUnits in libTooling by using std::unique_ptr.David Blaikie2014-04-251-8/+8
| | | | llvm-svn: 207229
* Revert "Reland r206934 with a hopefully fixed test"Rafael Espindola2014-04-251-1/+1
| | | | | | | This reverts commit r207155. The test was still failing. llvm-svn: 207225
* CodeGen: Avoid instrumenting implicit Decls more effectivelyJustin Bogner2014-04-251-2/+4
| | | | | | | | | | We don't assign counters for implicit Decls, but we were emitting code to increment the (non-existent) counters and adding empty counter lists in the output. This fixes the checks in assignRegionCounters and emitInstrumentationData to do the right thing, and adds an assert for the pathological case of emitting zero counters. llvm-svn: 207203
* Reland r206934 with a hopefully fixed testReid Kleckner2014-04-241-1/+1
| | | | llvm-svn: 207155
* If we see an explicit instantiation declaration or definition of a functionRichard Smith2014-04-242-20/+27
| | | | | | | | | | | | | after we've already instantiated a definition for the function, pass it to the ASTConsumer again so that it knows the specialization kind has changed and can update the function's linkage. This only matters if we instantiate the definition of the function before we reach the end of the TU; this can happen in at least three different ways: C++11 constexpr functions, C++14 deduced return types, and functions instantiated within modules. llvm-svn: 207152
* MicrosoftVTableContext: Don't leak VPtrInfos. Found by LSan, PR19522.Nico Weber2014-04-241-0/+2
| | | | llvm-svn: 207138
* Intrin.h: remove __rdtsc and __rdtscp declarationsHans Wennborg2014-04-241-3/+0
| | | | | | Since r207132, these are defined in ia32intrin.h. llvm-svn: 207134
* [X86] Add Clang support for intrinsics __rdtsc and __rdtscp.Andrea Di Biagio2014-04-241-3/+7
| | | | | | | | | | | | | | This patch: 1. Adds a definition for two new GCCBuiltins in BuiltinsX86.def: __builtin_ia32_rdtsc; __builtin_ia32_rdtscp; 2. Replaces the already existing definition of intrinsic __rdtsc in ia32intrin.h with a simple call to the new GCC builtin __builtin_ia32_rdtsc. 3. Adds a definition for the new intrinsic __rdtscp in ia32intrin.h llvm-svn: 207132
* Squelch leak found by LSan by handling missing switch case.Jordan Rose2014-04-241-2/+3
| | | | | | | | Also, use the enum type in the switch so this doesn't happen again. PR19523 llvm-svn: 207128
* [mips] Support 128-bit int in N32 ABI by overriding TargetInfo::hasInt128Type()Daniel Sanders2014-04-241-0/+2
| | | | | | | | | | | | | | Summary: The condition in the base class is rather strange. It says a target has the 128-bit integer type if the size of a pointer is >= 64-bits. N32 has 32-bit pointers but 64-bit integers. I'm a bit reluctant to change this for all targets so this patch makes the method virtual and overrides it for MIPS64. Reviewers: atanasyan Reviewed By: atanasyan Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D3472 llvm-svn: 207121
* CommentToXMLConverter: Don't use "default" to method(s). It is unavailable ↵NAKAMURA Takumi2014-04-241-1/+1
| | | | | | in msc17. llvm-svn: 207107
* [mips] Correct size_t and ptrdiff_t for N32.Daniel Sanders2014-04-241-10/+22
| | | | | | | | | | | | | | Summary: Correct size_t to be unsigned int and ptrdiff_t to be signed long. The types were the correct size before this change but the exact type matters for name mangling and exception handling in C++. Reviewers: atanasyan Reviewed By: atanasyan Differential Revision: http://reviews.llvm.org/D3470 llvm-svn: 207093
* Comment to XML conversion: use unique_ptr for SimpleFormatContextDmitri Gribenko2014-04-241-10/+6
| | | | llvm-svn: 207087
* Don't leak _all_ directives in -verify mode. Found by LSan, PR19520.Nico Weber2014-04-241-3/+1
| | | | llvm-svn: 207079
* Don't leak invalid RegexDirectives. Probably a small part of PR19520.Nico Weber2014-04-241-4/+6
| | | | llvm-svn: 207077
* Fix two leaks found by LSan (one is test-only).Nico Weber2014-04-241-1/+1
| | | | | | | The result of llvm::MemoryBuffer::getMemBuffer() needs to be freed. Don't pass "don't free" flag to overrideFileContents() to fix. llvm-svn: 207075
* Revert the "don't leak" part of r207065, looks like the bots don't like it :-/Nico Weber2014-04-241-1/+2
| | | | | | http://bb.pgr.jp/builders/cmake-clang-x86_64-linux/builds/22506 llvm-svn: 207070
* Don't leak objects in load-from-ast path unless DisableFree is set.Nico Weber2014-04-241-5/+5
| | | | | | Also update a comment to match a code change that was done in r110978. llvm-svn: 207065
* When two templates get merged together, also merge their pattern declarationsRichard Smith2014-04-242-28/+99
| | | | | | | | | | | | | | together. This is extremely hairy, because in general we need to have loaded both the template and the pattern before we can determine whether either should be merged, so we temporarily violate the rule that all merging happens before reading a decl ends, but *only* in the case where a template's pattern is being loaded while loading the template itself. In order to accomodate this for class templates, delay loading the injected class name type for the pattern of the template until after we've loaded the template itself, if we happen to load the template first. llvm-svn: 207063
* Bury leaked sema pointer when reading from AST files.Nico Weber2014-04-241-2/+2
| | | | | | Should suppress several LSan reports. llvm-svn: 207056
* Fix another leak in ParseMicrosoftAsmStatement(), found by LSan.Nico Weber2014-04-231-2/+3
| | | | llvm-svn: 207040
* Suppress unused variable warningReid Kleckner2014-04-231-1/+3
| | | | llvm-svn: 207039
* Make RewriteRope less confusing for me. No intended behavior change.Nico Weber2014-04-231-3/+2
| | | | llvm-svn: 207032
* Fix leak introduced in r194610, found by LSan.Nico Weber2014-04-231-0/+4
| | | | | | | | | | LSan folks: LSan pointed to #0 0x4953e0 in operator new[](unsigned long) llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:64 #1 0x7fb82af5372f in clang::RewriteRope::MakeRopeString(char const*, char const*) llvm/tools/clang/lib/Rewrite/Core/RewriteRope.cpp:796 instead of to the actual leak, which made tracking this down slower than it could have been. llvm-svn: 207031
* Do not print inferred submodules explicitly in __inferred_module.mapBen Langmuir2014-04-232-4/+8
| | | | | | | | | | | | | | Otherwise including a header in your source file that is not included by framework's umbrella header will silently add an empty submodule with that name. is automatically translated to @import Foo.NotInModule; which then would have succeeded because the inferred module map contained an empty submodule called NotInModule. llvm-svn: 207024
* Fix a memory leak found by LSan.Nico Weber2014-04-231-3/+4
| | | | llvm-svn: 207013
* Quick fix for layering that broke shared library build.John Thompson2014-04-232-27/+33
| | | | llvm-svn: 207011
* MS ABI: Use a different guard variable for each weak globalReid Kleckner2014-04-231-11/+16
| | | | | | | | | | We were using the same guard variable and failing to initialize the second global. Clang is still not MS ABI compatible in this area. Fixing that is PR16959, which will require LLVM changes to @llvm.global_ctors. llvm-svn: 207008
* Make TypeDecl much less friendly.Richard Smith2014-04-234-15/+14
| | | | llvm-svn: 207007
* Objective-C [IRGen]. Fixes a crash in IRGen involving use ofFariborz Jahanian2014-04-231-1/+4
| | | | | | | 'typeof' to extract type of an @encode expression used in an initializer. // rdar://16655340 llvm-svn: 207004
* [analyzer] Fix a leak found by LSan.Jordan Rose2014-04-231-4/+4
| | | | | | PR19524 llvm-svn: 207001
* Don't pass llvm::DenseSet<> by value.Alexander Kornienko2014-04-231-4/+4
| | | | | | | | | | | | | | Summary: Fixes massive performance problems on large translation units. Reviewers: jordan_rose Reviewed By: jordan_rose Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D3471 llvm-svn: 206999
* Replacing a naked pointer with a unique_ptr. No functional changes intended.Aaron Ballman2014-04-231-3/+3
| | | | llvm-svn: 206986
* Updated to be a bit more const friendly. Also switched the linkage to be ↵Aaron Ballman2014-04-231-3/+3
| | | | | | static since this function is file-local. No functional changes intended. llvm-svn: 206982
* Fix unused variable.John Thompson2014-04-231-1/+1
| | | | llvm-svn: 206981
* Add aarch64-linux-android triple for Android.Logan Chien2014-04-231-1/+2
| | | | llvm-svn: 206979
* Initial implementation of -modules-earch-all option, for searching for ↵John Thompson2014-04-2314-63/+173
| | | | | | symbols in non-imported modules. llvm-svn: 206977
* This reverts commit r206934 and r206935.Rafael Espindola2014-04-231-1/+1
| | | | | | | | | | The original messages were: "Driver: Honor %INCLUDE% when built with MinGW" "Add missing test triples" The test was still failing on OS X. llvm-svn: 206973
* Update Target::createMCAsmParser calls for the LLVM interface change.Evgeniy Stepanov2014-04-231-1/+5
| | | | | | Patch by Yuri Gorshenin. llvm-svn: 206970
* [ARM64] Change inline assembly constraints to be more lax, to match the ↵James Molloy2014-04-231-30/+21
| | | | | | | | behaviour of Clang/AArch64 and GCC. GCC allows sub-64bit values to use the 'r' register constraint. llvm-svn: 206963
* [ARM64] Add a missed case label for arm64_be, and enable the aarch64-varargs ↵James Molloy2014-04-231-1/+2
| | | | | | | | test for arm64_be. This ensures that r203917 (cpirker "AArch64_be varargs processing for ARM ABI") is ported to ARM64. llvm-svn: 206961
* MS ABI: Implement mangling for ref-qualifiers on methodsDavid Majnemer2014-04-231-0/+20
| | | | | | | | Mangle ref-qualifiers like the Nov 2013 CTP. This fixes PR19361. llvm-svn: 206946
* MS ABI: Use range-based for loops in the manglerDavid Majnemer2014-04-231-16/+9
| | | | | | No functional change. llvm-svn: 206945
* MS ABI: Cleanup some egregious style violationsDavid Majnemer2014-04-231-39/+33
| | | | | | No functional change. llvm-svn: 206944
* AST: Cleanup/simplify some LV calculation codeDavid Majnemer2014-04-231-20/+16
| | | | | | No functional change. llvm-svn: 206943
* CodeGen: Unify handling guard variables in the Itanium C++ ABIJustin Bogner2014-04-231-41/+39
| | | | | | | | | | | | | | | We previously treated ARM separately from the generic Itanium ABI for initializing guard variables. This code duplication led to things like the ARM path missing the memory barrier for threadsafe handling, and a highly misleading comment about how we were (mis)using the generic ABI for ARM64 when really it went through the ARM codepath. This unifies the two code paths. Functionally, this changes the ARM and ARM64 codepath to use one byte loads instead of 4 and 8, respectively, and adds the missing atomic acquire to these loads. Other architectures are unchanged. llvm-svn: 206937
* Driver: Honor %INCLUDE% when built with MinGWReid Kleckner2014-04-231-1/+1
| | | | | | | | | | | Users are expected to pass system includes through the INCLUDE environment variable on Windows. There's no reason to change behavior based on the toolchain used to build Clang. I didn't change the registry searching code because I'm not sure it builds with mingw and I'm not set up to test it. llvm-svn: 206934
* Driver: Avoid a duplicate path separator and clean up codeReid Kleckner2014-04-231-17/+19
| | | | llvm-svn: 206933
* Add some missing checks for C++1y digit separators that don't in fact separateRichard Smith2014-04-221-0/+6
| | | | | | | | digits. Turns out we have completely separate lexing codepaths for floating point numbers depending on whether or not they start with a zero. Who knew... =) llvm-svn: 206932
* PR18746: If a constexpr function has a dependent return type and no returnRichard Smith2014-04-221-2/+4
| | | | | | | | statements, don't diagnose; the return type might end up being 'void'. Patch by Rahul Jain! Tiny tweaks by me. llvm-svn: 206929
OpenPOWER on IntegriCloud