- Mar 21, 2017
-
-
Serge Pavlov authored
CMake variable LLVM_DEFINITIONS collects preprocessor definitions provided for host compiler that builds llvm components. A function add_llvm_definitions was introduced in AddLLVMDefinitions.cmake to keep track of these definitions and was intended to be a replacement for CMake command add_definitions. Actually in many cases add_definitions is still used and the content of LLVM_DEFINITIONS is not actual now. On the other hand the current version of CMake allows getting set of definitions in a more convenient way. This fix implements evaluation of the variable by reading corresponding cmake property. Differential Revision: https://reviews.llvm.org/D31125 llvm-svn: 298336
-
Zachary Turner authored
llvm-svn: 298335
-
Zachary Turner authored
Use LLVM's equivalent versions instead. Differential Revision: https://reviews.llvm.org/D31111 llvm-svn: 298334
-
Jason Molenda authored
initialized in the ctor and they're only initialized to 'true' in ClangUserExpression.cpp when specific languages are detected so we can use uninitialized values. This bug has been present since the ivars were added in r144042. <rdar://problem/31105864> llvm-svn: 298333
-
Akira Hatanaka authored
This commit adds support for a new attribute that will be used to distinguish between extensible and inextensible enums. There are three main purposes of this attribute: 1. Give better control over when enum-related warnings are issued. For example, in the code below, clang will not issue a -Wassign-enum warning if the enum is marked "open": enum __attribute__((enum_extensibility(closed))) EnumClosed { B0 = 1, B1 = 10 }; enum __attribute__((enum_extensibility(open))) EnumOpen { C0 = 1, C1 = 10 }; enum EnumClosed ec = 100; // warning issued enum EnumOpen eo = 100; // no warning 2. Enable code-completion and debugging tools to offer better suggestions. 3. Make it easier for swift's clang importer to determine which swift type an enum should be mapped to. For more details, see the discussion I started on cfe-dev: http://lists.llvm.org/pipermail/cfe-dev/2017-February/052748.html rdar://problem/12764379 rdar://problem/23145650 Differential Revision: https://reviews.llvm.org/D30766 llvm-svn: 298332
-
Jim Ingham authored
This fixes a bug introduced by r291559. The Module's FindType was passing the original name not the basename in the case where it didn't find any separators. I also added a testcase for this. <rdar://problem/31159173> llvm-svn: 298331
-
Peter Collingbourne authored
Setting dllexport on a declaration has no effect, as we do not emit export directives for declarations. Part of the fix for PR32334. Differential Revision: https://reviews.llvm.org/D31162 llvm-svn: 298330
-
Vitaly Buka authored
Fix memory leaks on check-llvm tests detected by Asan. This reverts commit r298282. llvm-svn: 298329
-
Eli Friedman authored
The glueless lowering of addc/adde in Thumb1 has known serious miscompiles (see https://reviews.llvm.org/D31081), and r297820 causes an infinite loop for certain constructs. It's not clear when they will be fixed, so let's just take them out of the tree for now. (I resolved a small conflict with r297453.) llvm-svn: 298328
-
Reid Kleckner authored
Summary: This also delays setting the output filename based on the first input argument until after processing /def. Fixes PR32354 Reviewers: ruiu, pcc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D31152 llvm-svn: 298327
-
Zachary Turner authored
Differential Revision: https://reviews.llvm.org/D31110 llvm-svn: 298326
-
Zachary Turner authored
Differential Revision: https://reviews.llvm.org/D31108 llvm-svn: 298325
-
Zachary Turner authored
This analyzes the dependency graph and computes all minimal cycles. Equivalent cycles that differ only by rotation are excluded, as are cycles that are "super-cycles" of other smaller cycles. For example, if we discover the cycle A -> C -> A, and then later A -> B -> C -> D -> A, this latter cycle is not considered. Thus, it is possible that after eliminating some cycles, new ones will appear. However, this is the only way to make the algorithm terminate in a reasonable amount of time. llvm-svn: 298324
-
Rafael Espindola authored
It is the only file type that needs it. llvm-svn: 298323
-
Zachary Turner authored
In doing so, clean up the MD5 interface a little. Most existing users only care about the lower 8 bytes of an MD5, but for some users that care about the upper and lower, there wasn't a good interface. Furthermore, consumers of the MD5 checksum were required to handle endianness details on their own, so it seems reasonable to abstract this into a nicer interface that just gives you the right value. Differential Revision: https://reviews.llvm.org/D31105 llvm-svn: 298322
-
- Mar 20, 2017
-
-
Vadzim Dambrouski authored
The special case of zero sized values was previously not handled correctly. This patch handles this by not promoting if the size is zero. Patch by Tim Neumann. Differential Revision: https://reviews.llvm.org/D31116 llvm-svn: 298320
-
Eric Christopher authored
- Fix a variable naming mismatch - Fix gcc extension pointer arithmetic on void to cast to char *. - Test that the header (and htmintrin.h) parse. llvm-svn: 298318
-
Sanjay Patel authored
llvm-svn: 298317
-
Alexander Kornienko authored
llvm-svn: 298316
-
Alexander Kornienko authored
llvm-svn: 298315
-
Jonathan Peyton authored
This change slightly improves performance of KMP_YIELD_NOW() macro, by using _rdtsc() intrinsic function if possible. Patch by Hansang Bae Differential Revision: https://reviews.llvm.org/D31008 llvm-svn: 298314
-
Jonathan Peyton authored
Affinity initialization code expects __kmp_affinity_type has the value affinity_default by default, but the cleanup code does not properly set the value back to affinity_default. This may introduce some issues when multiple roots are trying to initialize/uninitialize the runtime successively. Patch by Hansang Bae Differential Revision: https://reviews.llvm.org/D31012 llvm-svn: 298313
-
Matt Arsenault authored
Missed this check when porting from the libcall version. llvm-svn: 298312
-
Tim Northover authored
Otherwise a scheduler might do bad things to the code we produce. llvm-svn: 298311
-
Vedant Kumar authored
PR32346 suggests that UBSan's docs about the -fsanitize, -fno-sanitize-recover, and -fsanitize-trap options are not explicit enough. Try to improve the wording. llvm-svn: 298310
-
Adrian Prantl authored
and mark the methods as protected. Besides reducing the surface area of DwarfExpression, this is in preparation for an upcoming bugfix in the DwarfExpression implementation, for which it will be necessary to defer emitting register operations until the rest of the expression is known. NFC llvm-svn: 298309
-
Adrian Prantl authored
llvm-svn: 298308
-
Eric Christopher authored
available by default on those cpus and configurations. llvm-svn: 298307
-
Simon Atanasyan authored
The patch introduces two new relocations expressions R_MIPS_GOT_GP and R_MIPS_GOT_GP_PC. The first one represents a current value of `_gp` pointer and used to calculate relocations against the `__gnu_local_gp` symbol. The second one represents the offset between the beginning of the function and the `_gp` pointer's value. There are two motivations for introducing new expressions: - It's better to keep all non-trivial relocation calculations in the single place - `getRelocTargetVA` function. - Relocations against both `_gp_disp` and `__gnu_local_gp` symbols depend on the `_gp` value. It's a magical value points to the "middle" of GOT. Now all relocations use a common `_gp` value. But in fact, under some conditions each input file might require its own `_gp` value. I'm going to implement it in the future patches. So it's better to make `MipsGotSection` responsible for calculation of the `_gp` value. llvm-svn: 298306
-
Alex Shlyapnikov authored
Summary: sysconf(_SC_PAGESIZE) is called very early, during sanitizer init and any instrumented code (a wrapper/interceptor will likely be instrumented) calling back to sanitizer before init is done will most surely crash. Reviewers: eugenis Subscribers: llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D31092 llvm-svn: 298305
-
Simon Atanasyan authored
llvm-svn: 298304
-
Kostya Serebryany authored
Summary: Proposal: Backward-edge CFI for return statements (RCFI) Reviewers: pcc, eugenis, krasin Reviewed By: eugenis Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D31112 llvm-svn: 298303
-
Evgeniy Stepanov authored
Make x86_64-fuchsia targets under -mcmodel=kernel use %gs rather than %fs to access ABI slots for stack-protector and safe-stack Patch by Roland McGrath. Differential Revision: https://reviews.llvm.org/D30870 llvm-svn: 298302
-
Eli Friedman authored
If loop bound containing calculations like min(a,b), the Scalar Evolution API getSmallConstantTripMultiple returns 4294967295 "-1" as the trip multiple. The problem is that, SCEV use -1 * umax to represent umin. The multiple constant -1 was returned, and the logic of guarding against huge trip counts was skipped. Because -1 has 32 active bits. The fix attempt to factor more general cases. First try to get the greatest power of two divisor of trip count expression. In case overflow happens, the trip count expression is still divisible by the greatest power of two divisor returned. Returns 1 if not divisible by 2. Patch by Huihui Zhang <huihuiz@codeaurora.org> Differential Revision: https://reviews.llvm.org/D30840 llvm-svn: 298301
-
Richard Smith authored
llvm-svn: 298300
-
Richard Smith authored
llvm-svn: 298299
-
David L. Jones authored
Summary: - Migrated from grep to FileCheck. - Re-indented, removed boilerplate comments. - Added 'entry' label at beginning of basic block. Patch by Jorge Gorbe! Reviewed By: RKSimon Subscribers: RKSimon, jgorbe, llvm-commits Differential Revision: https://reviews.llvm.org/D30317 llvm-svn: 298298
-
Zachary Turner authored
These are needed due to some obscure rules in the standard about how std::vector selects between copy and move constructors, which can cause a conforming implementation to attempt to select the copy constructor of RuleMatcher, which will fail since std::unique_ptr<> isn't copyable. llvm-svn: 298294
-
Nirav Dave authored
llvm-svn: 298293
-
Kevin Enderby authored
and test cases for each of the error checks. To do this more plumbing was needed so that the segment indexes and segment offsets can be checked. Basically what was done was the SegInfo from llvm-objdump’s MachODump.cpp was moved into libObject for Mach-O objects as BindRebaseSegInfo and it is only created when an iterator for bind or rebase entries are created. This commit really only adds the error checking and test cases for the bind table entires and the checking for the lazy bind and weak bind entries are still to be fully done as well as the rebase entires. Though some of the plumbing for those are added with this commit. Those other error checks and test cases will be added in follow on commits. Note, the two llvm_unreachable() calls should now actually be unreachable with the error checks in place and would take a logic bug in the error checking code to be reached if the segment indexes and segment offsets are used from a checked bind entry. Comments have been added to the methods that require the arguments to have been checked prior to calling. llvm-svn: 298292
-