summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Revert "[modules] Add experimental -fmodule-map-file-home-is-cwd flag to -cc1."Duncan P. N. Exon Smith2014-12-093-41/+26
| | | | | | | | | | | | | This reverts commit r223753. It broke the Green Dragon build for a few hours: http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_build/2259/ http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_build/2259/consoleFull#43901905849ba4694-19c4-4d7e-bec5-911270d8a58c I suspect `clang-tools-extra` just needs a follow-up for an API change, but I'm not the right one to look into it. llvm-svn: 223759
* [modules] Add experimental -fmodule-map-file-home-is-cwd flag to -cc1.Richard Smith2014-12-093-26/+41
| | | | | | | | | | | | | For files named by -fmodule-map-file=, and files found by 'extern module' directives, this flag specifies that we should resolve filenames relative to the current working directory rather than relative to the directory in which the module map file resides. This is aimed at fixing path handling, in particular for relative -I paths, when building modules that represent components of the current project (rather than libraries installed on the current system, which the current project has as dependencies, where we'd typically expect the module map files to be looked up implicitly). llvm-svn: 223753
* DebugInfo: Correctly identify the location of C++ member initializer list ↵David Blaikie2014-12-094-23/+31
| | | | | | | | | | | | | elements This particularly helps the fidelity of ASan reports (which can occur even in these examples - if, for example, one uses placement new over a buffer of insufficient size - now ASan will correctly identify which member's initialization went over the end of the buffer). This doesn't cover all types of members - more coming. llvm-svn: 223726
* [modules] If the same .pcm file is imported via two different paths, don'tRichard Smith2014-12-091-1/+3
| | | | | | complain that the contained modules are defined twice. llvm-svn: 223724
* Revert "Driver: Objective-C should respect -fno-exceptions"David Majnemer2014-12-091-14/+25
| | | | | | | | This reverts commit r223455. It's been succesfully argued that -fexceptions (at the driver level) is a misnomer and has little to do with -fobjc-exceptions. llvm-svn: 223723
* Handle possible TypoExprs in member initializers.Kaelyn Takata2014-12-081-0/+5
| | | | | | | Includes a new test case since none of the existing tests were hitting this code path. llvm-svn: 223705
* DebugInfo: Ensure the store for an assignment is attributed to the beginning ↵David Blaikie2014-12-081-0/+2
| | | | | | of the assignment expression llvm-svn: 223699
* clang-format: Indent correctly in conditional expressions after return.Daniel Jasper2014-12-081-1/+2
| | | | | | | | | | | | | | | | | | | This only applies when not aligning after the return itself (which is commonly done for C++. Before: return aaaaaaaaaa ? bbbbbbbbbb( bbbbbb) // This is indented relative to aaaaaaaaaa. : b; After: return aaaaaaaaaa ? bbbbbbbbbb( bbbbbb) : b; llvm-svn: 223694
* clang-format: [Java] Always break after annotations of multiline decls.Daniel Jasper2014-12-082-5/+6
| | | | | | | | | | | | | Before: @Mock DataLoader loooooooooooooooooooooooader = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa; After: @Mock DataLoader loooooooooooooooooooooooader = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa; llvm-svn: 223688
* InstrProf: Use LLVM's -instrprof pass for profilingJustin Bogner2014-12-088-274/+54
| | | | | | | | The logic for lowering profiling counters has been moved to an LLVM pass. Emit the intrinsics rather than duplicating the whole pass in clang. llvm-svn: 223683
* clang-format: Support commas in lambda return types.Daniel Jasper2014-12-081-0/+1
| | | | | | | | | | Before: auto next_pair = [](A * a) -> pair<A*, A*>{}; After: auto next_pair = [](A* a) -> pair<A*, A*>{}; llvm-svn: 223652
* [libclang] Use same USR encoding for 'char' regardless of what the target ↵Argyrios Kyrtzidis2014-12-081-1/+1
| | | | | | | | considers the sign to be. Should fix the clang-hexagon-elf bot. llvm-svn: 223642
* [libclang] Encode InjectedClassNameType in the USR.Argyrios Kyrtzidis2014-12-081-0/+4
| | | | llvm-svn: 223634
* [libclang] Encode location info for anonymous embedded tag decls.Argyrios Kyrtzidis2014-12-081-1/+5
| | | | | | Otherwise the USR will conflict with different embedded tag decls. llvm-svn: 223633
* [libclang] Use same USR encoding for 'class' as 'struct'.Argyrios Kyrtzidis2014-12-081-3/+3
| | | | | | | | 'class' and 'struct' can be used interchangebly for forward references. Use the same encoding otherwise we may get into a weird situation where the USR for the same declaration is different based on whether the definition of the tag reference is visible or not. llvm-svn: 223632
* [libclang] Encode C++11 rvalue reference types in the USR.Argyrios Kyrtzidis2014-12-081-0/+5
| | | | llvm-svn: 223631
* [libclang] Encode the C++11 method reference qualifier in the USR.Argyrios Kyrtzidis2014-12-081-0/+5
| | | | llvm-svn: 223630
* [libclang] Reflect in USR generation that 'signed char' and 'unsigned char' ↵Argyrios Kyrtzidis2014-12-081-1/+2
| | | | | | can overload a 'char' in C++, by giving them distinct encodings. llvm-svn: 223629
* [libclang] Function templates can be 'overloaded' by return type, so encode ↵Argyrios Kyrtzidis2014-12-081-0/+23
| | | | | | | | the return type in the USR and handle DependentNameType in order to be able to distinguish them. llvm-svn: 223628
* clang-format: Don't merge lines with comments.Daniel Jasper2014-12-071-0/+3
| | | | | | | | | | | | | | Before: int f() { // comment return 42; } After: int f() { // comment return 42; } This fixes llvm.org/PR21769. llvm-svn: 223609
* Rename a couple of preprocessor symbols to be more descriptive. NFC.Paul Robinson2014-12-063-11/+11
| | | | | | Review feedback from recent changes to GetSVN.cmake. llvm-svn: 223578
* [modules] If we import a module, and we've seen a module map that describes theRichard Smith2014-12-061-2/+24
| | | | | | | | | module, use the path from the module map file in preference to the path from the .pcm file when resolving relative paths in the .pcm file. This allows diagnostics (and .d output) to give relative paths if the module was found via a relative path. llvm-svn: 223577
* No memcpy for copy ctor with -fsanitize-address-field-padding=1Kostya Serebryany2014-12-061-2/+3
| | | | | | | | | | | | | | | | | | | Summary: When -fsanitize-address-field-padding=1 is present don't emit memcpy for copy constructor. Thanks Nico for the extra test case. Test Plan: regression tests Reviewers: thakis, rsmith Reviewed By: rsmith Subscribers: rsmith, cfe-commits Differential Revision: http://reviews.llvm.org/D6515 llvm-svn: 223563
* PR21217: Slightly more eagerly load -fmodule-map-file= files and provideRichard Smith2014-12-063-15/+9
| | | | | | diagnostics if they don't exist. Based on a patch by John Thompson! llvm-svn: 223561
* Additional safety for the root cause of regression in r223443; make the moduleRichard Smith2014-12-061-0/+1
| | | | | | map path more canonical before hashing it. No functionality change. llvm-svn: 223547
* [modules] Instead of storing absolute paths in a .pcm file, store the path toRichard Smith2014-12-053-142/+187
| | | | | | | | | | | | | | | the root of the module and use paths relative to that directory wherever possible. This is a step towards allowing explicit modules to be relocated without being rebuilt, which is important for some kinds of distributed builds, for good paths in diagnostics, and for appropriate .d output. This is a recommit of r223443, reverted in r223465; when joining together imported file paths, we now use the system's separator rather than always using '/'. This avoids path mismatches between the original module build and the module user on Windows (at least, in some cases). A more comprehensive fix will follow. llvm-svn: 223539
* ASTDumper: print whether a function is constexprHans Wennborg2014-12-051-0/+4
| | | | llvm-svn: 223538
* Specify the name of the generated header only once. NFC.Paul Robinson2014-12-051-4/+7
| | | | | | This will also simplify a private patch that we have. llvm-svn: 223537
* Make DiagnosticErrorTrap work even if SuppressAllDiagnostics is enabled.Richard Smith2014-12-051-10/+11
| | | | | | Patch by Brad King! llvm-svn: 223525
* Workaround attribute ordering issue with kernel only attributesMatt Arsenault2014-12-051-0/+10
| | | | | | | | | | | Placing the attribute after the kernel keyword would incorrectly reject the attribute, so use the smae workaround that other kernel only attributes use. Also add a FIXME because there are two different phrasings now for the same error, althoug amdgpu_num_[sv]gpr uses a consistent one. llvm-svn: 223490
* Use else if when checking multiple attributes.Matt Arsenault2014-12-051-4/+2
| | | | | | Only one of these can really match. llvm-svn: 223489
* Modify __has_attribute so that it only looks for GNU-style attributes. ↵Aaron Ballman2014-12-051-1/+1
| | | | | | Removes the ability to look for generic attributes and keywords via this macro, which has the potential to be a breaking change. However, since there is __has_cpp_attribute and __has_declspec_attribute, and given the limited usefulness of querying a generic attribute name regardless of syntax, this seems like the correct path forward. llvm-svn: 223468
* Added a new preprocessor macro: __has_declspec_attribute. This can be used ↵Aaron Ballman2014-12-051-0/+5
| | | | | | as a way to determine whether Clang supports a __declspec spelling for a given attribute, similar to __has_attribute and __has_cpp_attribute. llvm-svn: 223467
* Temporarily reverting r223443 due to bot breakage.Aaron Ballman2014-12-053-187/+140
| | | | llvm-svn: 223465
* clang-format: Support NS_OPTIONS, CF_ENUM and CF_OPTIONS.Daniel Jasper2014-12-052-1/+8
| | | | | | This fixes llvm.org/PR21756. llvm-svn: 223458
* Driver: Objective-C should respect -fno-exceptionsDavid Majnemer2014-12-051-25/+14
| | | | | | | | | | | | Clang attempted to replicate a GCC bug: -fobjc-exceptions forces -fexceptions to be enabled. However, this has unintended effects and other awkard side effects that Clang doesn't "correctly" ape (e.g. it's impossible to turn off C++ exceptions in ObjC++ mode). Instead, -f[no]objc-exceptions and -f[no]cxx-exceptions now have an identical relationship with -f[no]exceptions. llvm-svn: 223455
* Driver: Cleanup -fexceptions behaviorDavid Majnemer2014-12-051-48/+15
| | | | | | | No functionality change is intended, just a cleanup of the logic clang uses to determine what -fexceptions/-fno-exceptions ends up doing. llvm-svn: 223453
* [OPENMP] Codegen for 'omp barrier' directive.Alexey Bataev2014-12-053-42/+48
| | | | | | | | | Adds generation of call to "i32 kmpc_cancel_barrier(ident_t *, i32)" libcall for explicitly specified barriers (OMP_IDENT_BARRIER_EXPL flag is added to "flags" field of "ident_t" structure). Also this patch replaces all calls to "kmpc_barrier" function by calls of "__kmpc_cancel_barrier" function which provides additional functionality for OpenMP 4.0. Also, library specific enum OpenMPLocationFlags moved to private section of CGOpenMPRuntime class to make it more independent from library implementation. Differential Revision: http://reviews.llvm.org/D6447 llvm-svn: 223444
* [modules] Instead of storing absolute paths in a .pcm file, store the path toRichard Smith2014-12-053-140/+187
| | | | | | | | | the root of the module and use paths relative to that directory wherever possible. This is a step towards allowing explicit modules to be relocated without being rebuilt, which is important for some kinds of distributed builds, for good paths in diagnostics, and for appropriate .d output. llvm-svn: 223443
* Have the driver and the target code agree on what the default ABIEric Christopher2014-12-051-1/+36
| | | | | | | | | is for each machine. Fix up darwin tests that were testing for aapcs on armv7-ios when the actual ABI is apcs. Should be no user visible change without -cc1. llvm-svn: 223429
* Use isOSBinFormatMachO() instead of comparing the object formatEric Christopher2014-12-053-4/+3
| | | | | | against an enum. llvm-svn: 223422
* Parse qualifiers after comma in declarator lists as a Microsoft extensionNico Rieck2014-12-041-0/+40
| | | | | | MSVC parses and ignores these with a warning. llvm-svn: 223413
* Recognize __unaligned keyword after type specifierNico Rieck2014-12-041-0/+1
| | | | | | | | The __unaligned keyword can appear after a struct definition: struct foo {...} __unaligned *x; llvm-svn: 223412
* Adding a FIXME to the code, based on a discussion in IRC; NFC.Aaron Ballman2014-12-041-0/+4
| | | | llvm-svn: 223403
* Silence warning: "NOMINMAX" redefined.Yaron Keren2014-12-041-1/+3
| | | | llvm-svn: 223391
* Add attributes for AMDGPU register limits.Matt Arsenault2014-12-042-0/+74
| | | | | | | This is a performance hint that can be applied to kernels to attempt to limit the number of used registers. llvm-svn: 223384
* clang-format: [JS] Don't put top-level dict literals on a single line.Daniel Jasper2014-12-041-0/+3
| | | | | | | These are often used for enums which apparently are easier to read if formatted with one element per line. llvm-svn: 223367
* Fix PR21684 - Ellipsis following an 'auto' parameter sans name/ID Faisal Vali2014-12-041-7/+8
| | | | | | | | should indicate a c++ parameter pack not a c-variadic. int i = [](auto...) { return 0; }(); // OK now. llvm-svn: 223357
* clang-format: More restrictively classify import declarations.Daniel Jasper2014-12-041-1/+2
| | | | | | | | | | | Before: import::SomeFunction(aaaaaaaaaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaaaaaaaaa); After: import::SomeFunction(aaaaaaaaaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaaaaaaaaa); llvm-svn: 223345
* [OPENMP] Codegen for 'omp master' directiveAlexey Bataev2014-12-043-3/+86
| | | | | | | | | | | | | | Patch adds 2 library functions to OpenMPRuntime class - int32 kmpc_master(ident_t *, int32 gtid) and void kmpc_end_master(ident_t *, int32 gtid); For 'omp master' directive the next code is generated: if (__kmpc_master(loc, gtid)) { <Associated structured block>; __kmpc_end_master(log, gtid); } Differential Revision: http://reviews.llvm.org/D6473 llvm-svn: 223342
OpenPOWER on IntegriCloud