summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* [OPENMP] Parsing and sema analysis for 'copyprivate' clause.Alexey Bataev2014-06-2718-51/+525
| | | | llvm-svn: 211886
* const_cast the memory MemoryBuffer following LLVM r211883Alp Toker2014-06-271-1/+2
| | | | llvm-svn: 211884
* Driver: Pass -ivfsoverlay to module crashdumpsJustin Bogner2014-06-272-1/+10
| | | | | | | | When we create a crashdump involving modules, we build a VFS to reproduce the problem with. This updates the reproduction script to use that VFS. llvm-svn: 211876
* Add a FIXME for an unfortunate issue in ConvertBackendLocation()Alp Toker2014-06-271-1/+3
| | | | | | | This function is copying the entire file contents into memory repeatedly and allocating new file IDs *each time* a source location is processed. llvm-svn: 211874
* Driver: use GNU::Link for the Generic_GCC toolchainSaleem Abdulrasool2014-06-274-21/+28
| | | | | | | | | | | | | | | | | This changes the behaviour of the driver for linking to match that of the Generic_GCC::Assemble. The default link should use "ld" rather than "gcc" for the linker as gcc does. This avoids the unnecessary round-tripping through gcc. It also is much more reasonable behaviour from the user's perspective. This should have been updated with SVN r195554 which changed the behaviour of Generic_GCC::Assemble. The gcc_forward test needs to be updated to mark the fact that -march is a flag for GCC not ld. This was updated as a typo fix, but added a check for a flag that is not a link flag. The bindings test covers the change for testing, and thus no new test was added. llvm-svn: 211866
* CodeGenAction: don't duplicate entire .ll/.bc files into memoryAlp Toker2014-06-271-6/+1
| | | | | | Requires supporting changes from LLVM r211861. llvm-svn: 211862
* [OPENMP] Added several test cases in nesting of OpenMP regions test after ↵Alexey Bataev2014-06-271-0/+102
| | | | | | review from Samuel F Antao. llvm-svn: 211857
* Account for differences in grep implementationsAlp Toker2014-06-271-3/+3
| | | | llvm-svn: 211856
* Restore test from r211844 skipping '.file' directivesAlp Toker2014-06-271-8/+8
| | | | | | | At least this answers the question of whether .bc/.ll input processed by the frontend produces identical output to the original compilation. llvm-svn: 211853
* Partially disable test from r211844Alp Toker2014-06-271-2/+4
| | | | | | | ELF assembly contains .line directives that differ based on the input filename. Weaken the test while considering options. llvm-svn: 211849
* Add test coverage for .bc input in the frontendAlp Toker2014-06-271-0/+17
| | | | | | | | | | | | | Test that we can consume LLVM bitcode and additionally check that it produces the same output as a direct compilation. The feature is crashy and has gone untested until now, but we might as well provide some coverage as long as it remains in tree. Also test LL source input in the same way because the existing tests for that don't look convincing. llvm-svn: 211844
* Remove .bc from test config.suffixesAlp Toker2014-06-271-1/+1
| | | | | | This was unused. Besides, a binary file can't really contain lit ShTests. llvm-svn: 211843
* clang/test/Driver/fuse-ld.c: Really fix to match dos path.NAKAMURA Takumi2014-06-271-8/+8
| | | | llvm-svn: 211841
* Do not inline methods of C++ containers (coming from headers).Anna Zaks2014-06-274-30/+58
| | | | | | | | | | | | | | | | | | | This silences false positives (leaks, use of uninitialized value) in simple code that uses containers such as std::vector and std::list. The analyzer cannot reason about the internal invariances of those data structures which leads to false positives. Until we come up with a better solution to that problem, let's just not inline the methods of the containers and allow objects to escape whenever such methods are called. This just extends an already existing flag "c++-container-inlining" and applies the heuristic not only to constructors and destructors of the containers, but to all of their methods. We have a bunch of distinct user reports all related to this issue (radar://16058651, radar://16580751, radar://16384286, radar://16795491 [PR19637]). llvm-svn: 211832
* Allow different path separator for windows build.Logan Chien2014-06-271-8/+8
| | | | llvm-svn: 211823
* Avoid extra back reference key lookup in msmanglerReid Kleckner2014-06-261-19/+17
| | | | | | | | | | | | | | | Avoid a second key lookup when the back reference key is going to be inserted in the StringMap. The string lookups in the msmangler are the main responsible for the huge overhead when compared to the itanium mangler. This patch makes a small but noticeable improvement. Reviewed by: rnk Differential Revision: http://reviews.llvm.org/D4130 Patch by Agustín Bergé! llvm-svn: 211813
* Objective-C ARC. Provide diagnostic and fix-it Fariborz Jahanian2014-06-264-1/+71
| | | | | | | | | when casting a retainable object to a objc_bridge_related CF type with the suggestion of applying the method specified in the bridging attribute to the object. // rdar://15932435 llvm-svn: 211807
* Driver: Fix a misleading comment and test for what it actually didJustin Bogner2014-06-262-1/+2
| | | | llvm-svn: 211806
* Driver: Remove trailing whitespaceJustin Bogner2014-06-261-2/+2
| | | | llvm-svn: 211805
* clang-cl: Don't store the cl compiler Tool on the stack (PR20131)Hans Wennborg2014-06-262-4/+18
| | | | | | | | | | | | | | The Command will refer back to the Tool as its source, so it has to outlive the Command. Having the Tool on the stack would cause us to crash when using "clang-cl -GR -fallback", because if the Command fails, Driver::ExecuteCompilation tries to peek at the Command's source. Differential Revision: http://reviews.llvm.org/D4314 llvm-svn: 211802
* ARM: Correctly identify cortex-m4 as v7em.Jim Grosbach2014-06-262-5/+21
| | | | | | | | | | | Get the predefined macro for the architecture correct. cortex-m4: __ARM_ARCH_7EM__ cortex-m3: __ARM_ARCH_7M__ cortex-m0: __ARM_ARCH_6M__ rdar://17420090 llvm-svn: 211792
* Add a Visualizer for VarDecl.Zachary Turner2014-06-261-6/+21
| | | | | | | | Reviewed by: Aaron Ballman Differential Revision: http://reviews.llvm.org/D4303 llvm-svn: 211788
* Propset the executables for GetProgramPath().Logan Chien2014-06-268-0/+0
| | | | llvm-svn: 211786
* Implement the -fuse-ld= option.Logan Chien2014-06-2615-11/+105
| | | | | | | | | | | | | | This commit implements the -fuse-ld= option, so that the user can specify -fuse-ld=bfd to use ld.bfd. This commit re-applies r194328 with some test case changes. It seems that r194328 was breaking macosx or mingw build because clang can't find ld.bfd or ld.gold in the given sysroot. We should use -B to specify the executable search path instead. Patch originally by David Chisnall. llvm-svn: 211785
* Add ppc64/power8 as a targetWill Schmidt2014-06-265-5/+56
| | | | llvm-svn: 211778
* [OPENMP] Initial parsing and sema analysis for 'single' directive.Alexey Bataev2014-06-2628-5/+887
| | | | llvm-svn: 211774
* [OPENMP] Initial parsing and sema analysis for 'section' directive.Alexey Bataev2014-06-2627-33/+335
| | | | llvm-svn: 211767
* Sema: Allow dllimport entities in template args for mingwDavid Majnemer2014-06-262-20/+28
| | | | | | | | | | | | | | Previously dllimport variables inside of template arguments relied on not using the C++11 codepath when -fms-compatibility was set. While this allowed us to achieve compatibility with MSVC, it did so at the expense of MingW. Instead, try to use the DeclRefExpr we dig out of the template argument. If it has the dllimport attribute, accept it and skip the C++11 null-pointer check. llvm-svn: 211766
* Convert some function arguments to use ArrayRef.Craig Topper2014-06-268-91/+63
| | | | llvm-svn: 211764
* Convert StringLiteralParser constructor to use ArrayRef instead of a pointer ↵Craig Topper2014-06-2610-30/+29
| | | | | | and count. llvm-svn: 211763
* Make test from r211758 portableAlp Toker2014-06-261-0/+1
| | | | | | | It turns out the -fblocks option is determined by the default tooling target and not implied by the other two flags. llvm-svn: 211761
* CodeGen: Improve warnings about uninstrumented files when profilingJustin Bogner2014-06-269-12/+95
| | | | | | | | | Improve the warning when building with -fprofile-instr-use and a file appears not to have been profiled at all. This keys on whether a function is defined in the main file or not to avoid false negatives when one includes a header with functions that have been profiled. llvm-svn: 211760
* Reformat RAVs to sync up following recent updatesAlp Toker2014-06-262-42/+41
| | | | llvm-svn: 211759
* RAV: visit copy expressions of captured variables in blocks (ObjC++11)Alp Toker2014-06-264-1/+32
| | | | | | Patch by Mathieu Baudet. llvm-svn: 211758
* Forward -u to the linker on gnutools toolchainsReid Kleckner2014-06-262-0/+7
| | | | | | | | | | | | | | | | Summary: The BSDs and Darwin all forward the whole 'u' group, but gcc only forwards -u so far as I can tell. I only forward -u, since that's a minimal change, and many people object to magically recognizing and forwarding linker arguments. Reviewers: chandlerc, joerg Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4304 llvm-svn: 211756
* Make -Wincomplete-umbrella go through the VFSBen Langmuir2014-06-257-4/+42
| | | | | | | By using vfs::recursive_directory_iterator, this warning will now fire when some or all of a module's headers are from VFS mappings. llvm-svn: 211746
* Make PR20038.cpp test case portable to non-Itanium ABIsDavid Blaikie2014-06-251-1/+1
| | | | | | | The only call in this function is to the dtor, so there's no need to name a non-portable mangled function name to match it. llvm-svn: 211742
* Remove REQUIRES lines from portable testsAlp Toker2014-06-254-6/+0
| | | | | | These tests are target-independent and shouldn't ever be suppressed. llvm-svn: 211738
* Don't allow dllimport variables in constant initializersHans Wennborg2014-06-255-13/+14
| | | | | | | | | | | | | | | | | This is a follow-up to David's r211677. For the following code, we would end up referring to 'foo' in the initializer for 'arr', and then fail to link, because 'foo' is dllimport and needs to be accessed through the __imp_?foo. __declspec(dllimport) extern const char foo[]; const char* f() { static const char* const arr[] = { foo }; return arr[0]; } Differential Revision: http://reviews.llvm.org/D4299 llvm-svn: 211736
* fixed typos in commentSanjay Patel2014-06-251-1/+1
| | | | llvm-svn: 211734
* Add vfs::recursive_directory_iteratorBen Langmuir2014-06-253-8/+168
| | | | | | | | | For now, this is only used by its unit tests. It is similar to the API in llvm::sys::fs::recursive_directory_iterator, but without some of the more complex features like requesting that the iterator not recurse into the next directory, for example. llvm-svn: 211732
* MS ABI: Propagate class-level DLL attributes to class template ↵Hans Wennborg2014-06-256-5/+433
| | | | | | | | | | | | | | | | | | | | | | | | | | | specialization bases (PR11170) Consider the following code: template <typename T> class Base {}; class __declspec(dllexport) class Derived : public Base<int> {} When the base of an exported or imported class is a class template specialization, MSVC will propagate the dll attribute to the base. In the example code, Base<int> becomes a dllexported class. This commit makes Clang do the proopagation when the base hasn't been instantiated yet, and warns about it being unsupported otherwise. This is different from MSVC, which allows changing a specialization back and forth between dllimport and dllexport and seems to let the last one win. Changing the dll attribute after instantiation would be hard for us, and doesn't seem to come up in practice, so I think this is a reasonable limitation to have. MinGW doesn't do this kind of propagation. Differential Revision: http://reviews.llvm.org/D4264 llvm-svn: 211725
* PR20038: DebugInfo: Call sites without DebugLocs for temporary dtors after a ↵David Blaikie2014-06-252-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | conditional With && at the top level of an expression, the last thing done when emitting the expression was an unconditional jump to the cleanup block. To reduce the amount of stepping, the DebugLoc is omitted from the unconditional jump. This is done by clearing the IRBuilder's "CurrentDebugLocation"*. If this is not set to some non-empty value before the cleanup block is emitted, the cleanups don't get a location either. If a call without a location is emitted in a function with debug info, and that call is then inlined - bad things happen. (without a location for the call site, the inliner would just leave the inlined DebugLocs as they were - pointing to roots in the original function, not inlined into the current function) Follow up commit to LLVM will ensure that breaking the invariants of the DebugLoc chains by having chains that don't lead to the current function will fail assertions, so we shouldn't accidentally slip any of these cases in anymore. Those assertions may reveal further cases that need to be fixed in clang, though I've tried to test heavily to avoid that. * See r128471, r128513 for the code that clears the CurrentDebugLocation. Simply removing this code or moving the code into IRBuilder to apply to all unconditional branches would regress desired behavior, unfortunately. llvm-svn: 211722
* Fix treatment of types defined in function prototypeSerge Pavlov2014-06-254-14/+76
| | | | | | | | | | | | Types defined in function prototype are diagnosed earlier in C++ compilation. They are put into declaration context where the prototype is introduced. Later on, when FunctionDecl object is created, these types are moved into the function context. This patch fixes PR19018 and PR18963. Differential Revision: http://reviews.llvm.org/D4145 llvm-svn: 211718
* Headers: be a bit more careful about inline asmSaleem Abdulrasool2014-06-251-0/+12
| | | | | | | | | Conditionally include x86intrin.h if we are building for x86 or x86_64. Conditionalise definition of inline assembly routines which use x86 or x86_64 inline assembly. This is needed as clang can target Windows on ARM where these definitions may be included into user code. llvm-svn: 211716
* Rename loop unrolling and loop vectorizer metadata to have a common prefix.Eli Bendersky2014-06-255-27/+26
| | | | | | | | | | | | | | | | | | | [Clang part] These patches rename the loop unrolling and loop vectorizer metadata such that they have a common 'llvm.loop.' prefix. Metadata name changes: llvm.vectorizer.* => llvm.loop.vectorizer.* llvm.loopunroll.* => llvm.loop.unroll.* This was a suggestion from an earlier review (http://reviews.llvm.org/D4090) which added the loop unrolling metadata. Patch by Mark Heffernan. llvm-svn: 211712
* Fixing the RST markup for the #pragma loop attribute documentation.Aaron Ballman2014-06-251-2/+2
| | | | llvm-svn: 211693
* Fixing the position of the supported syntax marker when generating attribute ↵Aaron Ballman2014-06-251-1/+1
| | | | | | documentation. llvm-svn: 211692
* Escaping a literal character to fix an RST warning.Aaron Ballman2014-06-251-1/+1
| | | | llvm-svn: 211690
* Align with new GCC options for x86 AndroidAlexey Volkov2014-06-252-4/+9
| | | | | | | | | 32-bit: +ssse3 64-bit: +sse4.2 +popcnt Differential Revision: http://reviews.llvm.org/D4287 llvm-svn: 211688
OpenPOWER on IntegriCloud