| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
llvm-svn: 229219
|
| |
|
|
|
|
|
| |
they're given a null pointer as an argument, so we do not need to emit null
checks on their results.
llvm-svn: 229213
|
| |
|
|
|
|
|
| |
We could be a little kinder if we did a compare-exchange loop instead of
an atomic-load/store pair.
llvm-svn: 229212
|
| |
|
|
|
|
|
| |
This reverts commit r229123. It was a red herring, the bug was present
without r229082.
llvm-svn: 229205
|
| |
|
|
|
|
|
|
|
| |
Bools are a little tricky, they are i8 in memory and must be coerced
back to i1 before further operations can be performed on them.
This fixes PR22577.
llvm-svn: 229204
|
| |
|
|
| |
llvm-svn: 229123
|
| |
|
|
| |
llvm-svn: 229092
|
| |
|
|
|
|
|
|
|
|
|
|
| |
declarations and just use the legacy namespace qualifier in this file
and the permanent header name.
The old wrapper header is going away to make LLVM's build more modular,
and without updating Clang I can't easily start to add usage of the new
pass manager to Clang. This should make it more clear in the code which
set of types is doing what.
llvm-svn: 229090
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The /volatile:ms semantics turn volatile loads and stores into atomic
acquire and release operations. This distinction is important because
volatile memory operations do not form a happens-before relationship
with non-atomic memory. This means that a volatile store is not
sufficient for implementing a mutex unlock routine.
Differential Revision: http://reviews.llvm.org/D7580
llvm-svn: 229082
|
| |
|
|
|
|
| |
We don't need a bool to track this now that we have a stack for it.
llvm-svn: 228982
|
| |
|
|
|
|
| |
Reviewed at http://reviews.llvm.org/D7575
llvm-svn: 228977
|
| |
|
|
| |
llvm-svn: 228963
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This patch installs an InlineAsmDiagnosticsHandler to avoid the crash
report when the input is bitcode and the bitcode contains invalid inline
assembly. The handler will simply print the same error message that will
print from the backend.
Add CHECK in test-case
Reviewers: echristo, rafael
Reviewed By: rafael
Subscribers: rafael, cfe-commits
Differential Revision: http://reviews.llvm.org/D7568
llvm-svn: 228898
|
| |
|
|
| |
llvm-svn: 228880
|
| |
|
|
|
|
|
| |
LLVM doesn't support non-call exceptions, so inlining makes it harder to
catch such asynchronous exceptions.
llvm-svn: 228876
|
| |
|
|
| |
llvm-svn: 228863
|
| |
|
|
|
|
|
|
|
|
|
| |
a non-uniqueable temporary node that is only turned into a permanent
unique or distinct node after it is finished.
Otherwise an intermediate node may get accidentally uniqued with another
node as illustrated by the testcase.
Paired commit with LLVM.
llvm-svn: 228855
|
| |
|
|
|
|
|
| |
Disabling exceptions applies nounwind to lots of functions. SEH catches
asynch exceptions, so emit the landing pad anyway.
llvm-svn: 228769
|
| |
|
|
|
|
| |
handling in repeatedly for aggregate, complex, and scalar types)
llvm-svn: 228591
|
| |
|
|
| |
llvm-svn: 228589
|
| |
|
|
|
|
|
|
| |
Matches the existing code for scalar default arguments. Complex default
arguments probably need the same handling too (test/fix to that coming
next).
llvm-svn: 228588
|
| |
|
|
|
|
|
|
| |
It's slightly cheaper than copying it, if the DebugLoc points to replaceable
metadata every copy is recorded in a DenseMap, moving reduces the peak size of
that map.
llvm-svn: 228492
|
| |
|
|
|
|
|
|
| |
modifiers on them. If we have a matching output constraint with
an early clobber make sure we don't propagate that to the input
constraint.
llvm-svn: 228422
|
| |
|
|
|
|
|
|
|
|
|
| |
After r228258, Clang started emitting C++ EH IR that LLVM wasn't ready
to deal with, even when exceptions were disabled with /EHs-. This time,
make /EHs- turn off -fexceptions while still emitting exceptional
constructs in functions using __try. Since Sema rejects C++ exception
handling constructs before CodeGen, landingpads should only appear in
such functions as the result of a __try.
llvm-svn: 228329
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch emits the following code for the single directive:
#pragma omp single
<body>
<---->
if(__kmpc_single(...)) {
<body>
__kmpc_end_single(...);
}
Differential Revision: http://reviews.llvm.org/D7045
llvm-svn: 228275
|
| |
|
|
|
|
|
|
|
| |
For 'taskyield' directive emit call to kmp_int32 __kmpc_omp_taskyield(ident_t *,
kmp_int32 global_tid, int end_part); runtime function call with end_part arg set
to 0 (it is ignored).
Differential Revision: http://reviews.llvm.org/D7047
llvm-svn: 228272
|
| |
|
|
|
|
|
|
|
| |
It caused a chromium base unittest that tests throwing and catching SEH
exceptions to fail (http://crbug.com/455488) and I suspect it might also
be the cause of the chromium clang win 64-bit shared release builder timing
out during compiles. So revert to see if that's true.
llvm-svn: 228262
|
| |
|
|
|
|
|
|
|
| |
/Users/Sean/pg/llvm/tools/clang/lib/CodeGen/CGException.cpp:1871:23: warning: unused variable 'Finally' [-Wunused-variable]
if (SEHFinallyStmt *Finally = S.getFinallyHandler()) {
^
1 warning generated.
llvm-svn: 228255
|
| |
|
|
| |
llvm-svn: 228243
|
| |
|
|
| |
llvm-svn: 228241
|
| |
|
|
|
|
| |
There's no reason for these to be different.
llvm-svn: 228240
|
| |
|
|
|
|
|
|
|
|
|
| |
Previously we would simply double-emit the body of the __finally block,
but that doesn't work when it contains any kind of Decl, which we can't
double emit.
This fixes that by emitting the block once and branching into a shared
code region and then branching back out.
llvm-svn: 228222
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the function.
Now if you break on a dtor and go 'up' in your debugger (or you get an
asan failure in a dtor) during an exception unwind, you'll have more
context. Instead of all dtors appearing to be called from the '}' of the
function, they'll be attributed to the end of the scope of the variable,
the same as the non-exceptional dtor call.
This doesn't /quite/ remove all uses of CurEHLocation (which might be
nice to remove, for a few reasons) - it's still used to choose the
location for some other work in the landing pad. It'd be nice to
attribute that code to the same location as the exception calls within
the block and to remove CurEHLocation.
llvm-svn: 228181
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Allow user to provide multiple blacklists by passing several
-fsanitize-blacklist= options. These options now don't override
default blacklist from Clang resource directory, which is always
applied (which fixes PR22431).
-fno-sanitize-blacklist option now disables all blacklists that
were specified earlier in the command line (including the default
one).
This change depends on http://reviews.llvm.org/D7367.
Test Plan: regression test suite
Reviewers: timurrrr
Subscribers: cfe-commits, kcc, pcc
Differential Revision: http://reviews.llvm.org/D7368
llvm-svn: 228156
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Named registers with the constraint "=&r" currently lose the early clobber flag
and turn into "=r" when converted to LLVM-IR. This patch correctly passes it on.
Reviewers: atanasyan
Reviewed By: atanasyan
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D7346
llvm-svn: 228143
|
| |
|
|
|
|
|
|
|
|
| |
__declspec(restrict) and __attribute(malloc) are both handled
identically by clang: they are allowed to the noalias LLVM attribute.
Seeing as how noalias models the C99 notion of 'restrict', rename the
internal clang attribute to Restrict from Malloc.
llvm-svn: 228120
|
| |
|
|
|
|
| |
Update for the API change in r228075
llvm-svn: 228076
|
| |
|
|
|
|
|
|
| |
We would synthesize memcpy intrinsics when emitting calls to trivial C++
constructors but we wouldn't take into account the alignment of the
destination.
llvm-svn: 228061
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are four major kinds of declarations that cause code generation:
- FunctionDecl (includes CXXMethodDecl etc)
- ObjCMethodDecl
- BlockDecl
- CapturedDecl
This patch tracks __try usage on FunctionDecls and diagnoses __try usage
in other decls. If someone wants to use __try from ObjC, they can use it
from a free function, since the ObjC code will need an ObjC-style EH
personality.
Eventually we will want to look through CapturedDecls and track SEH
usage on the parent FunctionDecl, if present.
llvm-svn: 228058
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
have default arguments, still have locations.
To handle default arguments in C++ in the debug info, we disable code
updating the debug location during the emission of default arguments.
This code was buggy in the case of default arguments which, themselves,
have default arguments - the inner default argument would re-enable
debug info when it was finished, but before the outer default argument
was finished.
This was already a bug, but got worse (because a crasher instead of just
a quality bug) with the recent improvements to debug info line quality
because... The ApplyDebugLocation scoped device would find the debug
info disabled and not save any debug location. But then in
~ApplyDebugLocation it would find the debug info had been enabled and
would then apply the no-location. Then the outer function call would be
emitted without any location. That's bad.
Arguably we could /also/ fix the ApplyDebugLocation to assert on this
situation (where debug info was disabled in the ctor and enabled in the
dtor, or the other way around) but this is at least the necessary fix
regardless.
(also, I imagine this disabling behavior might need to be in-place for
CGExprComplex and CGExprAgg too, maybe... ?)
And I seem to recall seeing some weird default arg stepping behavior
recently which might be related to this too... I'll have to look into
it.
llvm-svn: 228053
|
| |
|
|
| |
llvm-svn: 228035
|
| |
|
|
|
|
|
| |
The mock tags are no longer in `dwarf::LLVMConstants`; they're in
`dwarf::Tag`.
llvm-svn: 228032
|
| |
|
|
|
|
|
| |
- use named constructors
- get rid of MarkAsPrologue
llvm-svn: 228021
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
distinction between the different use-cases. With the previous default
behavior we would occasionally emit empty debug locations in situations
where they actually were strictly required (= on invoke insns).
We now have a choice between defaulting to an empty location or an
artificial location.
Specifically, this fixes a bug caused by a missing debug location when
emitting C++ EH cleanup blocks from within an artificial function, such as
an ObjC destroy helper function.
rdar://problem/19670595
llvm-svn: 228003
|
| |
|
|
| |
llvm-svn: 228002
|
| |
|
|
| |
llvm-svn: 227954
|
| |
|
|
|
|
| |
Update for the change in r227900.
llvm-svn: 227901
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This is especially important for targets that use multiple address spaces,
and commonly place global variables in address spaces other than zero.
Fixes PR22383
Test Plan: New test case added: llvm-used.cu
Reviewers: jingyue
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D7345
llvm-svn: 227861
|
| |
|
|
|
|
|
| |
Clang is otherwise consistent that Microsoft be abbreviated as MS, not
Ms.
llvm-svn: 227842
|
| |
|
|
|
|
|
|
|
|
| |
It is common for COM interface classes to be marked as 'novtable' to
tell the compiler that constructors and destructors should not reference
virtual function tables.
This commit implements this feature in clang.
llvm-svn: 227796
|