summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Convert a few classes over to use the new TrailingObjects helper.James Y Knight2015-08-063-68/+71
| | | | | | | | | | This initial commit serves as an example -- the remainder of the classes using pointer arithmetic for trailing objects will be converted in subsequent changes. Differential Revision: http://reviews.llvm.org/D11298 llvm-svn: 244262
* Remove unused 'Owned' flag from TemplateArgumentList.James Y Knight2015-08-061-1/+1
| | | | llvm-svn: 244261
* [Frontend] Fix crash when serializing diagnostics with really long text.Argyrios Kyrtzidis2015-08-061-1/+1
| | | | | | rdar://21896690 llvm-svn: 244245
* [OPENMP 4.1] Allow references in init expression for loop-based constructs.Alexey Bataev2015-08-065-11/+60
| | | | | | OpenMP 4.1 allows to use variables with reference types in private clauses and, therefore, in init expressions of the cannonical loop forms. llvm-svn: 244209
* Mark calls in thunk functions as tail-call optimization candidatesMichael Kuperstein2015-08-061-0/+2
| | | | | | | | | | | | | When a thunk is generated with a call to the original adjusted function, the thunk appears in the debugger call stack. We want the backend to perform tail-call optimization on the call, to make it invisible to the debugger. This fixes PR24235 Patch by: amjad.aboud@intel.com Differential Revision: http://reviews.llvm.org/D11476 llvm-svn: 244207
* [X86] Add support for _MM_ALIGN16Michael Kuperstein2015-08-061-0/+5
| | | | | | Differential Revision: http://reviews.llvm.org/D11753 llvm-svn: 244201
* [ObjC] Circular containers: add support of subclassesAlex Denisov2015-08-062-115/+72
| | | | llvm-svn: 244193
* [modules] Defer setting up the lookup table for a DeclContext until we canRichard Smith2015-08-063-113/+106
| | | | | | | | | | | | | | | | determine the primary context, rather than sometimes registering the lookup table on the wrong context. This exposed a couple of bugs: * the odr violation check didn't deal properly with mergeable declarations if the declaration retained by name lookup wasn't in the canonical definition of the class * the (broken) RewriteDecl mechanism would emit two name lookup tables for the same DeclContext into the same module file (one as part of the rewritten declaration and one as a visible update for the old declaration) These are both fixed too. llvm-svn: 244192
* Rename the non-coding style conformant functions in namespace BuiltinsEric Christopher2015-08-0610-26/+24
| | | | | | to match the rest of their brethren and reformat the bits that need it. llvm-svn: 244186
* Driver: Strip -header-include-file and -diagnostic-log-file from crash repro ↵Justin Bogner2015-08-051-0/+1
| | | | | | | | | scripts These two arguments tend to refer to a local path that won't exist when we try to reproduce a bug. Strip them. llvm-svn: 244179
* Rename DescriptionString -> DataLayoutString as it matches the actualEric Christopher2015-08-055-93/+91
| | | | | | use of the string. llvm-svn: 244178
* Add -fno-coverage-mapping flag.Diego Novillo2015-08-052-3/+7
| | | | | | | This new flag allows the user to disable a previous instance of -fcoverage-mapping, if needed. llvm-svn: 244170
* function_ref-ize ExternalASTSource::FindExternalLexicalDecl and remove itsRichard Smith2015-08-056-70/+50
| | | | | | | | useless return value. Switch to using it directly when completing the redeclaration chain for an anonymous declaration, and reduce the set of declarations that we load in the process to just those of the right kind. llvm-svn: 244161
* Add flags to disable profile generation.Diego Novillo2015-08-051-28/+39
| | | | | | | | | | | | This patch adds flags -fno-profile-instr-generate and -fno-profile-instr-use, and the GCC aliases -fno-profile-generate and -fno-profile-use. These flags are used in situations where users need to disable profile generation or use for specific files in a build, without affecting other files. llvm-svn: 244153
* Remove unused header includes.Eric Christopher2015-08-051-1/+0
| | | | llvm-svn: 244131
* Rename builtin_lang -> Langs to match the rest of the code a bit better.Eric Christopher2015-08-051-9/+10
| | | | llvm-svn: 244126
* Remove unused function GetBuiltinNames.Eric Christopher2015-08-051-13/+0
| | | | llvm-svn: 244125
* Remove unnecessary ClangLibdirSuffix variable. Yaron Keren2015-08-051-6/+4
| | | | | | Twine + const char * is supported. llvm-svn: 244110
* Add -gcodeview and -gdwarf to control which type Clang emitsReid Kleckner2015-08-053-6/+29
| | | | | | | | | | | | | | | Summary: By default, 'clang' emits dwarf and 'clang-cl' emits codeview. You can force emission of one or both by passing -gcodeview and -gdwarf to either driver. Reviewers: dblaikie, hans Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D11742 llvm-svn: 244097
* [AArch64] Enable thread sanitizer on clangRenato Golin2015-08-051-2/+2
| | | | | | | | With this option, clang can use -fsanitize=thread on AArch64. Patch by Adhemerval Zanella. llvm-svn: 244091
* Claim arguments that belong to 'clang_ignored_gcc_optimization_f_Group'Douglas Katzman2015-08-051-0/+1
| | | | | | | | | | This seems preferable to printing two warnings per unsupported option- one warning about not supporting it, and one about not using it. It also makes the '-Wno-' option do what you mean. Differential Revision: http://reviews.llvm.org/D11766 llvm-svn: 244079
* Fix a tiny bug in -no-canonical-prefixes that somehow we have neverChandler Carruth2015-08-051-0/+3
| | | | | | | | | | | | | | | | | | | | | | noticed until now. The code for setting up the driver's InstalledDir didn't respect -no-canonical-prefixes. Because of this, there are a few places in the driver where we would unexpectedly form absolute paths, notably when searching for and finding GCC installations to use, etc. The fix is straightforward, and I've added this path to '-v' both so we can test it sanely and so that it will be substantially more obvious the next time someone has to debug something here. Note that there is another bug that we don't actually *canonicalize* the installed directory! I don't really want to fix that because I don't have a realistic way to test the usage of this mode. I suspect that folks using the shared module cache would care about getting this right though, and so they might want to address it. I've left the appropriate FIXMEs so that it is clear what to change, and I've updated the test code to make it clear what is happening here. llvm-svn: 244065
* Add missing atomic libcall support.James Y Knight2015-08-051-3/+71
| | | | | | | | | | Support for emitting libcalls for __atomic_fetch_nand and __atomic_{add,sub,and,or,xor,nand}_fetch was missing; add it, and some test cases. Differential Revision: http://reviews.llvm.org/D10847 llvm-svn: 244063
* Delete trailing whitespaceDouglas Katzman2015-08-051-16/+16
| | | | llvm-svn: 244051
* Add AST matchers for narrowing constructors that are default, copy, or move ↵Aaron Ballman2015-08-051-0/+4
| | | | | | constructors, as well as functionality to determine whether a ctor initializer is a base initializer. llvm-svn: 244036
* [AST] ArrayRefize template param list info setters. No functionality change ↵Benjamin Kramer2015-08-054-46/+28
| | | | | | intended. llvm-svn: 244028
* [AST] ArrayRefize BlockDecl::setCaptures. No functionality change intended.Benjamin Kramer2015-08-054-23/+11
| | | | llvm-svn: 244027
* [AST] ArrayRefize template argument packs. No functionality change intended.Benjamin Kramer2015-08-0510-36/+28
| | | | llvm-svn: 244026
* [Parse] ArrayRefize PragmaLoopHintInfo. No functionality change.Benjamin Kramer2015-08-051-10/+4
| | | | llvm-svn: 244024
* Don't repeat function names in comments. NFC.Filipe Cabecinhas2015-08-053-27/+23
| | | | llvm-svn: 244018
* [CodeGen] Fold memcpy into SmallVector initializer. No functionality change.Benjamin Kramer2015-08-041-3/+2
| | | | llvm-svn: 243992
* [Sema] Allocate SmallVector to the right size.Benjamin Kramer2015-08-041-1/+1
| | | | | | | | | | SmallVector::set_size does not reallocate the vector. Sadly I have no idea how to test this. The vector never has more than one member in all of the regression tests. Found by inspection. llvm-svn: 243987
* [AST] Really allocate a SmallVector to the right size.Benjamin Kramer2015-08-041-2/+1
| | | | | | | | | | set_size only resets the end pointer and asserts if it is used to grow the buffer. This would crash when mangling a float with more than 80 bits, add a test with a ppc double double (128 bits). Found by inspection. llvm-svn: 243979
* [AST] Simplify code by letting ArrayRef do the copying.Benjamin Kramer2015-08-041-10/+4
| | | | | | No functionality change intended. llvm-svn: 243974
* [CodeGen] Don't write into a SmallVector's uninitialized memory.Benjamin Kramer2015-08-041-7/+4
| | | | | | That's just ugly and not needed in this case. No functionality change. llvm-svn: 243973
* [ASTContext] Add a templated convenience wrapper for Allocate.Benjamin Kramer2015-08-041-1/+1
| | | | | | | | | This brings ASTContext closer to LLVM's Allocator concept. Ideally we would just derive ASTContext from llvm::AllocatorBase, but that does not work because ASTContext's allocator is mutable and we allocate using const ASTContext& everywhere. llvm-svn: 243972
* [FileManager] Use StringRef::copy to store canonical paths.Benjamin Kramer2015-08-041-9/+3
| | | | | | No functional change intended. llvm-svn: 243970
* [OPENMP 4.1] Support for 'linear' clause in loop directives.Alexey Bataev2015-08-041-0/+20
| | | | | | OpenMP 4.1 allows 'linear' clause in loop directives. Patch adds support for it. llvm-svn: 243969
* [Edit] Use StringRef's copy method. No functional change intended.Benjamin Kramer2015-08-041-1/+1
| | | | llvm-svn: 243968
* [AST] Use StringRef's convenient copy method. No functionality change.Benjamin Kramer2015-08-041-6/+1
| | | | llvm-svn: 243966
* [OPENMP] Fix compiler crash during data-sharing attributes analysis.Alexey Bataev2015-08-041-1/+3
| | | | | | If a global variable is marked as private in OpenMP construct and then is used in of the private clauses of the same construct, it might cause compiler crash because of incorrect capturing. llvm-svn: 243964
* [UB] Another place where we were trying to put string data intoChandler Carruth2015-08-041-2/+4
| | | | | | | | | | | | | a BumpPtrAllocator. This at least now handles the case where there is no concatentation without calling memcpy on a null pointer. It might be interesting to handle the case where everything is empty without round-tripping through the allocator, but it wasn't clear to me if the pointer returned is significant in any way, so I've left it in a conservatively more-correct state. Again, found with UBSan. llvm-svn: 243948
* [UB] When attaching empty strings to the AST, use an empty StringRefChandler Carruth2015-08-041-0/+2
| | | | | | | | rather than forcing the bump pointer allocator to produce a viable pointer. This also fixes UB when we would try to memcpy from the null incoming StringRef. llvm-svn: 243947
* [UB] Fix the two ways that we would try to memcpy from a null buffer inChandler Carruth2015-08-041-7/+9
| | | | | | | | | | | | | the nested name specifier code. First, skip the entire thing when the input is empty. Next, handle the case where we started off with a null buffer and a zero capacity to skip copying and freeing. This was found with UBSan. llvm-svn: 243946
* [modules] Make IndirectFieldDecl mergeable to avoid lookup ambiguity when ↵Richard Smith2015-08-041-0/+9
| | | | | | the same anonymous union is defined across multiple modules. llvm-svn: 243940
* Dtor callback emitted when msan attribute not repressed for this function.Naomi Musgrave2015-08-031-1/+2
| | | | | | | | | | | | | | | | | | Summary: In addition to checking compiler flags, the front-end also examines the attributes of the destructor definition to ensure that the SanitizeMemory attribute is attached. Reviewers: eugenis, kcc Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D11727 refactored test into new file, revised how function attribute examined modified test to examine default dtor with and without attribute removed attribute check llvm-svn: 243912
* [SHAVE] Pass all -f, -g, -O, -W options through directly to moviCompile.Douglas Katzman2015-08-031-16/+11
| | | | | | Differential Revision: http://reviews.llvm.org/D11581 llvm-svn: 243878
* [CONCEPTS] Add concept to VarDecl and diagnostic for uninitialized variable ↵Nathan Wilson2015-08-031-0/+12
| | | | | | | | | | | | | | concept Summary: Add IsConcept bit to VarDecl::NonParmVarDeclBitfields and associated isConcept/setConcept member functions. Set IsConcept to true when 'concept' specifier is in variable declaration. Create diagnostic when variable concept is not initialized. Reviewers: fraggamuffin, hubert.reinterpretcast, faisalv, aaron.ballman, rsmith Subscribers: aemerson, cfe-commits Differential Revision: http://reviews.llvm.org/D11600 llvm-svn: 243876
* Additional fix for PR14269: Crash on vector elements / global register vars ↵Andrey Bokhanko2015-08-032-14/+51
| | | | | | | | | | in inline assembler. Compiler crashed when vector elements / global register vars were used in inline assembler with "m" restriction. This patch fixes this. Differential Revision: http://reviews.llvm.org/D10476 llvm-svn: 243870
* [X86][AVX512VLBW] add pack, cvt, mulhi and madd intrinsicsAsaf Badouh2015-08-031-0/+429
| | | | | | Differential Revision: http://reviews.llvm.org/D11642 llvm-svn: 243867
OpenPOWER on IntegriCloud