summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix a use of err_nullability_conflicting that's triggering an assertion.Douglas Gregor2015-06-191-1/+2
| | | | llvm-svn: 240171
* [CFI] Require -flto instead of implying it.Alexey Samsonov2015-06-198-32/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is unfortunate, but would let us land http://reviews.llvm.org/D10467, that makes ToolChains responsible for computing the set of sanitizers they support. Unfortunately, Darwin ToolChains doesn't know about actual OS they target until ToolChain::TranslateArgs() is called. In particular, it means we won't be able to construct SanitizerArgs for these ToolChains before that. This change removes SanitizerArgs::needsLTO() method, so that now ToolChain::IsUsingLTO(), which is called very early, doesn't need SanitizerArgs to implement this method. Docs and test cases are updated accordingly. See https://llvm.org/bugs/show_bug.cgi?id=23539, which describes why we start all these. Test Plan: regression test suite Reviewers: pcc Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D10560 llvm-svn: 240170
* Fix no-asserts build failure due to unused variable, and cleanup some ↵David Blaikie2015-06-191-1/+3
| | | | | | unique_ptr usage while I'm here llvm-svn: 240169
* Add -flto to clang flags for cfi tests.Alexey Samsonov2015-06-191-1/+1
| | | | llvm-svn: 240168
* Simplify Pass::perform to take a SimpleFile& instead of unique_ptr<SimpleFile>&David Blaikie2015-06-1927-134/+132
| | | | | | | | None of the implementations replace the SimpleFile with some other file, they just modify the SimpleFile in-place, so a direct reference to the file is sufficient. llvm-svn: 240167
* Add comment for workarond in DYLDRendezvous with android versionTamas Berghammer2015-06-191-0/+1
| | | | llvm-svn: 240166
* [LoopDist] Rename RuntimeCheckEmitter to LoopVersioning, NFCAdam Nemet2015-06-191-8/+8
| | | | llvm-svn: 240165
* [LoopDist] Move pointer-to-partition computation out of RuntimeCheckEmitter, NFCAdam Nemet2015-06-191-18/+12
| | | | | | | This starts preparing the class to become a (more) general LoopVersioning utility class. llvm-svn: 240164
* Fix illegal chars that snuck into <memory>Marshall Clow2015-06-191-1/+1
| | | | llvm-svn: 240163
* Fix build brakage caused by r240154Tamas Berghammer2015-06-191-0/+1
| | | | llvm-svn: 240162
* COFF: Don't add new undefined symbols for /alternatename.Rui Ueyama2015-06-193-7/+11
| | | | | | | | | | | | Alternatename option is in the form of /alternatename:<from>=<to>. It's effect is to resolve <from> as <to> if <from> is still undefined at end of name resolution. If <from> is not undefined but completely a new symbol, alternatename shouldn't do anything. Previously, it introduced a new undefined symbol for <from>, which resulted in undefined symbol error. llvm-svn: 240161
* Delete dead code. NFC.Rafael Espindola2015-06-191-26/+0
| | | | llvm-svn: 240160
* Code completion for nullability type specifiers.Douglas Gregor2015-06-196-27/+98
| | | | | | Another part of rdar://problem/18868820. llvm-svn: 240159
* Check for consistent use of nullability type specifiers in a header.Douglas Gregor2015-06-1917-53/+334
| | | | | | | | | | | | | | | | | Adds a new warning (under -Wnullability-completeness) that complains about pointer, block pointer, or member pointer declarations that have not been annotated with nullability information (directly or inferred) within a header that contains some nullability annotations. This is intended to be used to help maintain the completeness of nullability information within a header that has already been audited. Note that, for performance reasons, this warning will underrepresent the number of non-annotated pointers in the case where more than one pointer is seen before the first nullability type specifier, because we're only tracking one piece of information per header. Part of rdar://problem/18868820. llvm-svn: 240158
* Load executable module when attaching to process; implement detach from process.Adrian McCarthy2015-06-194-39/+163
| | | | llvm-svn: 240157
* Introduced pragmas for audited nullability regions.Douglas Gregor2015-06-1918-78/+751
| | | | | | | | | | | | | | | | | Introduce the clang pragmas "assume_nonnull begin" and "assume_nonnull end" in which we make default assumptions about the nullability of many unannotated pointers: - Single-level pointers are inferred to __nonnull - NSError** in a (function or method) parameter list is inferred to NSError * __nullable * __nullable. - CFErrorRef * in a (function or method) parameter list is inferred to CFErrorRef __nullable * __nullable. - Other multi-level pointers are never inferred to anything. Implements rdar://problem/19191042. llvm-svn: 240156
* Implement the 'null_resettable' attribute for Objective-C properties.Douglas Gregor2015-06-199-8/+134
| | | | | | | | 'null_resettable' properties are those whose getters return nonnull but whose setters take nil, to "reset" the property to some default. Implements rdar://problem/19051334. llvm-svn: 240155
* Extend type nullability qualifiers for Objective-C.Douglas Gregor2015-06-1930-183/+1035
| | | | | | | | | | | | | | | Introduce context-sensitive, non-underscored nullability specifiers (nonnull, nullable, null_unspecified) for Objective-C method return types, method parameter types, and properties. Introduce Objective-C-specific semantics, including computation of the nullability of the result of a message send, merging of nullability information from the @interface of a class into its @implementation, etc . This is the Objective-C part of rdar://problem/18868820. llvm-svn: 240154
* Diagnose unsafe uses of nil and __nonnull pointers.Douglas Gregor2015-06-1911-60/+228
| | | | | | | | | | | | | | | | | | | This generalizes the checking of null arguments to also work with values of pointer-to-function, reference-to-function, and block pointer type, using the nullability information within the underling function prototype to extend non-null checking, and diagnoses returns of 'nil' within a function with a __nonnull return type. Note that we don't warn about nil returns from Objective-C methods, because it's common for Objective-C methods to mimic the nil-swallowing behavior of the receiver by checking ostensibly non-null parameters and returning nil from otherwise non-null methods in that case. It also diagnoses (via a separate flag) conversions from nullable to nonnull pointers. It's a separate flag because this warning can be noisy. llvm-svn: 240153
* Add a comment and FIXME based on the commit message that made theEric Christopher2015-06-191-0/+3
| | | | | | | intrinsic _mm_prefetch into a builtin rather than by textual inclusion via the intrinsic headers. llvm-svn: 240152
* AMDGPU: Fix filename in commentMatt Arsenault2015-06-191-1/+1
| | | | llvm-svn: 240151
* AMDGPU: Fix renamed file that was somehow dropped from last commitMatt Arsenault2015-06-191-0/+36
| | | | llvm-svn: 240150
* Make getRelocationSection MachO only.Rafael Espindola2015-06-197-39/+9
| | | | | | | | | | | | | | There are 3 types of relocations on MachO * Scattered * Section based * Symbol based On ELF and COFF relocations are symbol based. We were in the strange situation that we abstracted over two of them. This makes section based relocations MachO only. llvm-svn: 240149
* AMDGPU: Fix places missed in renameMatt Arsenault2015-06-195-74/+38
| | | | llvm-svn: 240148
* [lld] Allow LLD passes to return error codes.Lang Hames2015-06-1927-41/+80
| | | | llvm-svn: 240147
* Introduce type nullability specifiers for C/C++.Douglas Gregor2015-06-1924-16/+880
| | | | | | | | | | | | | | | | | | | | | | | | | Introduces the type specifiers __nonnull, __nullable, and __null_unspecified that describe the nullability of the pointer type to which the specifier appertains. Nullability type specifiers improve on the existing nonnull attributes in a few ways: - They apply to types, so one can represent a pointer to a non-null pointer, use them in function pointer types, etc. - As type specifiers, they are syntactically more lightweight than __attribute__s or [[attribute]]s. - They can express both the notion of 'should never be null' and also 'it makes sense for this to be null', and therefore can more easily catch errors of omission where one forgot to annotate the nullability of a particular pointer (this will come in a subsequent patch). Nullability type specifiers are maintained as type sugar, and therefore have no effect on mangling, encoding, overloading, etc. Nonetheless, they will be used for warnings about, e.g., passing 'null' to a method that does not accept it. This is the C/C++ part of rdar://problem/18868820. llvm-svn: 240146
* MIR Serialization: Serialize the list of machine basic blocks with simple ↵Alex Lorenz2015-06-194-0/+124
| | | | | | | | | | | | | | attributes. This commit implements the initial serialization of machine basic blocks in a machine function. Only the simple, scalar MBB attributes are serialized. The reference to LLVM IR's basic block is preserved when that basic block has a name. Reviewers: Duncan P. N. Exon Smith Differential Revision: http://reviews.llvm.org/D10465 llvm-svn: 240145
* [SLP] Vectorize for all-constant entries.Michael Zolotukhin2015-06-192-2/+20
| | | | | | Differential Revision: http://reviews.llvm.org/D10531 llvm-svn: 240144
* AMDGPU: Fix some places missed in renameMatt Arsenault2015-06-1920-17/+17
| | | | llvm-svn: 240143
* MIR Serialization: use default member initializers to initialize ↵Alex Lorenz2015-06-191-9/+3
| | | | | | | | yaml::MachineFunction. NFC. Default member initializers are permitted since r236244. llvm-svn: 240142
* Typo. NFC.Chad Rosier2015-06-191-2/+1
| | | | llvm-svn: 240141
* Avoid warning about inability to cast from ptr-to-obj to ptr-to-fun.Douglas Katzman2015-06-191-10/+10
| | | | | | Use POSIX.1-2003 Technical Corrigendum 1 suggested workaround. llvm-svn: 240140
* Fix ASAN bot; missing bookkeeping in r240136.Marshall Clow2015-06-191-0/+1
| | | | llvm-svn: 240139
* Fix the lldb build for the EM_486 change.Rafael Espindola2015-06-192-2/+2
| | | | llvm-svn: 240138
* Fixed/added namespace ending comments using clang-tidy. NFCAlexander Kornienko2015-06-19940-1157/+1157
| | | | | | | | | | | | | The patch is generated using this command: tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py -fix \ -checks=-*,llvm-namespace-comment -header-filter='llvm/.*|clang/.*' \ llvm/lib/ Thanks to Eugene Kosov for the original patch! llvm-svn: 240137
* Fix PR#18843. Thanks to Howard for the fixMarshall Clow2015-06-192-1/+8
| | | | llvm-svn: 240136
* Fix typo in comment.Douglas Katzman2015-06-191-1/+1
| | | | llvm-svn: 240135
* Add nominal support for 'shave' target.Douglas Katzman2015-06-196-0/+193
| | | | | | | | | | | | | | This change passes through C and assembler jobs to Movidius tools by constructing commands which are the same as ones produces by the examples in the SDK. But rather than reference MV_TOOLS_DIR to find tools, we will assume that binaries are installed wherever the Driver would find its native tools. Similarly, this change assumes that -I options will "just work" based on where SDK headers get installed, rather than baking into the Driver some magic paths. Differential Revision: http://reviews.llvm.org/D10440 llvm-svn: 240134
* Fix the build.Rafael Espindola2015-06-192-2/+2
| | | | | | Sorry, I have no idea how grep failed to find this. llvm-svn: 240133
* Replace EM_486 with EM_IAMCU.Rafael Espindola2015-06-191-1/+1
| | | | | | | This matches the current http://www.sco.com/developers/gabi/latest/ch4.eheader.html#machine llvm-svn: 240132
* [ASan] Initial support for Kernel AddressSanitizerAlexander Potapenko2015-06-1917-62/+171
| | | | | | | | | This patch adds initial support for the -fsanitize=kernel-address flag to Clang. Right now it's quite restricted: only out-of-line instrumentation is supported, globals are not instrumented, some GCC kasan flags are not supported. Using this patch I am able to build and boot the KASan tree with LLVMLinux patches from github.com/ramosian-glider/kasan/tree/kasan_llvmlinux. To disable KASan instrumentation for a certain function attribute((no_sanitize("kernel-address"))) can be used. llvm-svn: 240131
* Make all temporary symbols unnamed.Rafael Espindola2015-06-1925-130/+125
| | | | | | | | | | | | | | | | What this does is make all symbols that would otherwise start with a .L (or L on MachO) unnamed. Some of these symbols still show up in the symbol table, but we can just make them unnamed. In order to make sure we produce identical results when going thought assembly, all .L (not just the compiler produced ones), are now unnamed. Running llc on llvm-as.opt.bc, the peak memory usage goes from 208.24MB to 205.57MB. llvm-svn: 240130
* clang-format: Make exception to AlwaysBreakBeforeMultilineStrings moreDaniel Jasper2015-06-192-1/+5
| | | | | | | | | | | | | | | | | | conservative. In particular, this fixes an unwanted corner case. Before: string s = someFunction("aaaa" "bbbb"); After: string s = someFunction( "aaaa" "bbbb"); llvm-svn: 240129
* clang-format: Add TypeScript detection to git-clang-format.Daniel Jasper2015-06-191-0/+1
| | | | llvm-svn: 240128
* clang-format: Better fix to detect elaborated enum return types.Daniel Jasper2015-06-192-3/+12
| | | | | | | The previous one (r240021) regressed: enum E Type::f() { .. } llvm-svn: 240127
* [ATTRIBUTE] Fixed test compatibility.Alexey Bataev2015-06-191-1/+1
| | | | llvm-svn: 240126
* [ATTRIBUTE] Support base vector types of __attribute__((mode)), patch by ↵Alexey Bataev2015-06-194-10/+104
| | | | | | | | | | | | Alexey Frolov Base type of attribute((mode)) can actually be a vector type. The patch is to distinguish between base type and base element type. This fixes http://llvm.org/PR17453. Differential Revision: http://reviews.llvm.org/D10058 llvm-svn: 240125
* IRBuilder: Add unit tests for construction of globals with address spaceTobias Grosser2015-06-191-0/+12
| | | | | | This was forgotten in r240113. Thanks Eric for paying attention. llvm-svn: 240124
* [LLDB][MIPS] ABI Plugin for MIPS64Bhushan D. Attarde2015-06-198-0/+728
| | | | | | | | | | | SUMMARY: This patch implements ABI plugin for MIPS64. Reviewers: clayborg Subscribers: mohit.bhakkad, sagar, jaydeep, emaste, nitesh.jain, lldb-commits Differential Revision: http://reviews.llvm.org/D10534 llvm-svn: 240123
* CMake: Stop using LLVM's custom parse_arguments (delete implementation). NFCFilipe Cabecinhas2015-06-191-80/+0
| | | | | | | | | | | | | | | | Summary: Finally, delete LLVM's parse_arguments() definition. Second part of D10531. This is dependent on http://reviews.llvm.org/D10529 Reviewers: pcc, beanz, chapuni Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10531 llvm-svn: 240122
OpenPOWER on IntegriCloud