- Jan 22, 2015
-
-
Richard Smith authored
on top of a local declaration of the same entity, we still need to remember that we loaded the first one or we may fail to merge the second one properly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226765 91177308-0d34-0410-b5e6-96231b3b80d8
-
Justin Bogner authored
We don't emit any coverage mapping for uncovered functions that come from system headers, but we were creating a GlobalVariable with each of their names. This is wasteful since the linker will need to dead strip the unused symbols, and it can lead to issues when merging coverage with others TUs that do have coverage for those functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226764 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
load the definition data from the declaration itself. In that case, merge properly; don't assume the prior definition is the same as our own. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226761 91177308-0d34-0410-b5e6-96231b3b80d8
-
Reid Kleckner authored
The lowering looks a lot like normal EH lowering, with the exception that the exceptions are caught by executing filter expression code instead of matching typeinfo globals. The filter expressions are outlined into functions which are used in landingpad clauses where typeinfo would normally go. Major aspects that still need work: - Non-call exceptions in __try bodies won't work yet. The plan is to outline the __try block in the frontend to keep things simple. - Filter expressions cannot use local variables until capturing is implemented. - __finally blocks will not run after exceptions. Fixing this requires work in the LLVM SEH preparation pass. The IR lowering looks like this: // C code: bool safe_div(int n, int d, int *r) { __try { *r = normal_div(n, d); } __except(_exception_code() == EXCEPTION_INT_DIVIDE_BY_ZERO) { return false; } return true; } ; LLVM IR: define i32 @filter(i8* %e, i8* %fp) { %ehptrs = bitcast i8* %e to i32** %ehrec = load i32** %ehptrs %code = load i32* %ehrec %matches = icmp eq i32 %code, i32 u0xC0000094 %matches.i32 = zext i1 %matches to i32 ret i32 %matches.i32 } define i1 zeroext @safe_div(i32 %n, i32 %d, i32* %r) { %rr = invoke i32 @normal_div(i32 %n, i32 %d) to label %normal unwind to label %lpad normal: store i32 %rr, i32* %r ret i1 1 lpad: %ehvals = landingpad {i8*, i32} personality i32 (...)* @__C_specific_handler catch i8* bitcast (i32 (i8*, i8*)* @filter to i8*) %ehptr = extractvalue {i8*, i32} %ehvals, i32 0 %sel = extractvalue {i8*, i32} %ehvals, i32 1 %filter_sel = call i32 @llvm.eh.seh.typeid.for(i8* bitcast (i32 (i8*, i8*)* @filter to i8*)) %matches = icmp eq i32 %sel, %filter_sel br i1 %matches, label %eh.except, label %eh.resume eh.except: ret i1 false eh.resume: resume } Reviewers: rjmccall, rsmith, majnemer Differential Revision: http://reviews.llvm.org/D5607 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226760 91177308-0d34-0410-b5e6-96231b3b80d8
-
Rafael Espindola authored
This reverts commit r226758. Looks like rnk's 226757 fixed the real issue. Sorry for the noise. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226759 91177308-0d34-0410-b5e6-96231b3b80d8
-
Rafael Espindola authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226758 91177308-0d34-0410-b5e6-96231b3b80d8
-
Reid Kleckner authored
It fails on Windows due to another temporary being emitted first, so the LLVM internal renaming scheme gives out the name __block_descriptor_tmp1. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226757 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226756 91177308-0d34-0410-b5e6-96231b3b80d8
-
Hans Wennborg authored
Importing _Builtin_intrinsics.sse and avx would transitively pull in those headers, and the test would fail when building in an environment where they were not available on the include path. This fixes PR20995 for me. Differential Revision: http://reviews.llvm.org/D7112 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226754 91177308-0d34-0410-b5e6-96231b3b80d8
-
Rafael Espindola authored
Currently we emit DeferredDeclsToEmit in reverse order. This patch changes that. The advantages of the change are that * The output order is a bit closer to the source order. The change to test/CodeGenCXX/pod-member-memcpys.cpp is a good example. * If we decide to deffer more, it will not cause as large changes in the estcases as it would without this patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226751 91177308-0d34-0410-b5e6-96231b3b80d8
-
Rafael Espindola authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226743 91177308-0d34-0410-b5e6-96231b3b80d8
-
Chris Bieneman authored
Summary: cl::HideUnrelatedOptions allows tools to hide all options not part of a specific OptionCategory. This is the common use case for cl::getRegisteredOptions, which should be deprecated in the future because it exposes implementation details of command line parsing. Reviewers: dexonsmith Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D7109 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226741 91177308-0d34-0410-b5e6-96231b3b80d8
-
David Blaikie authored
This workaround was to provide unique call sites to ensure LLVM's inline debug info handling would properly unique two calls to the same function on the same line. Instead, this has now been fixed in LLVM (r226736) and the workaround here can be removed. Originally committed in r176895, but this isn't a straight revert due to all the changes since then. I just searched for anything ForcedColumn* related and removed them. We could test this - but it didn't strike me as terribly valuable once we're no longer adding this workaround everything just works as expected & it's no longer a special case to test for. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226738 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jan 21, 2015
-
-
David Blaikie authored
This test will start failing shortly once this bug is fixed in LLVM. At that point this behavior is no longer required in Clang and will be removed. In the interim, remove this test just to avoid the race between the LLVM and Clang commits. After the LLVM commit, I'll cleanup the workaround behavior in Clang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226735 91177308-0d34-0410-b5e6-96231b3b80d8
-
Rafael Espindola authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226709 91177308-0d34-0410-b5e6-96231b3b80d8
-
Reid Kleckner authored
This attribute implies indicates that the function musttail calls another function and returns whatever it returns. The return type of the thunk is meaningless, as the thunk can dynamically call different functions with different return types. So long as the callers bitcast the thunk with the correct type, behavior is well defined. This attribute was necessary to fix PR20944, where the indirect call combiner noticed that the thunk returned void and replaced the results of the indirect call instruction with undef. Over-the-shoulder reviewed by David Majnemer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226707 91177308-0d34-0410-b5e6-96231b3b80d8
-
Francisco Lopes da Silva authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226703 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226698 91177308-0d34-0410-b5e6-96231b3b80d8
-
Saleem Abdulrasool authored
Fix isTriviallyCopyableType for arrays. An array of type T is trivially copyable if T is trivially copyable. Patch by Agustín Bergé! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226696 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226685 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226680 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
Discovered by the awesome test case and ASAN. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226678 91177308-0d34-0410-b5e6-96231b3b80d8
-
Rafael Espindola authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226677 91177308-0d34-0410-b5e6-96231b3b80d8
-
Rafael Espindola authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226675 91177308-0d34-0410-b5e6-96231b3b80d8
-
Francisco Lopes da Silva authored
The improved completion in call context now works with: - Functions. - Member functions. - Constructors. - New expressions. - Function call expressions. - Template variants of the previous. There are still rough edges to be fixed: - Provide support for optional parameters. (fix known) - Provide support for member initializers. (fix known) - Provide support for variadic template functions. (fix unknown) - Others? git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226670 91177308-0d34-0410-b5e6-96231b3b80d8
-
Rafael Espindola authored
Should fix the test in -Asserts builds. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226668 91177308-0d34-0410-b5e6-96231b3b80d8
-
Rafael Espindola authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226667 91177308-0d34-0410-b5e6-96231b3b80d8
-
Rafael Espindola authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226666 91177308-0d34-0410-b5e6-96231b3b80d8
-
Rafael Espindola authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226662 91177308-0d34-0410-b5e6-96231b3b80d8
-
David Majnemer authored
We didn't consider any alignment attributes on an EnumDecl when calculating alignment. While we are here, ignore alignment specifications on typedef types if one is used as the underlying type. Otherwise, weird things happen: enum Y : int; Y y; typedef int __attribute__((aligned(64))) u; enum Y : u {}; What is the alignment of 'Y'? It would be more consistent with the overall design of enums with fixed underlying types to consider the underlying type's UnqualifiedDesugaredType. This fixes PR22279. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226653 91177308-0d34-0410-b5e6-96231b3b80d8
-
David Majnemer authored
This reverts commit r226626. err_after_alias is, in fact, reachable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226633 91177308-0d34-0410-b5e6-96231b3b80d8
-
David Majnemer authored
They can be emitted by multiple translation units and thus belong in a COMDAT group. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226630 91177308-0d34-0410-b5e6-96231b3b80d8
-
David Majnemer authored
A guard variable in a COMDAT'd function should also be in a COMDAT. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226629 91177308-0d34-0410-b5e6-96231b3b80d8
-
David Majnemer authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226628 91177308-0d34-0410-b5e6-96231b3b80d8
-
David Majnemer authored
Examples this would have catched are now handled by the attribute verification code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226626 91177308-0d34-0410-b5e6-96231b3b80d8
-
Kaelyn Takata authored
be corrected. This fixes PR22250, which exposed the bug where if there's more than one TypoExpr in the arguments, once one failed to be corrected none of the TypoExprs after it would be handled at all thanks to an early return. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226624 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jan 20, 2015
-
-
Rafael Espindola authored
This is in preparation for changing the link to use -Wl,-z,defs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226609 91177308-0d34-0410-b5e6-96231b3b80d8
-
Ben Langmuir authored
In a few places we didn't check that Category->getClassInterface() was not null before using it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226605 91177308-0d34-0410-b5e6-96231b3b80d8
-
Kaelyn Takata authored
The test case is based on the reduction from PR21679 and has to be freestanding to work correctly, since some of the expected errors (and some of the problems that were fixed) only occur when the end of the file is reached. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226603 91177308-0d34-0410-b5e6-96231b3b80d8
-
Hans Wennborg authored
This code adds the -mstack-probe-size command line option and implements the /Gs compiler switch for clang-cl. This should fix http://llvm.org/bugs/show_bug.cgi?id=21896 Patch by Andrew H! Differential Revision: http://reviews.llvm.org/D6685 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226601 91177308-0d34-0410-b5e6-96231b3b80d8
-