| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
PR17142.
llvm-svn: 190912
|
|
|
|
| |
llvm-svn: 189910
|
|
|
|
|
|
| |
tests fail.
llvm-svn: 188447
|
|
|
|
|
|
|
|
|
| |
Using CurFuncDecl is both correct and simple compared to crawling
the DeclContexts of the block.
Fixes <rdar://problem/14415072>.
llvm-svn: 186210
|
|
|
|
|
|
|
| |
Specifically, handle the case where the block is in a default argument
in a class method. The mangling here follows what we do for lambdas.
llvm-svn: 185991
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make sure we properly treat names defined inside a block as local
names. There are basically three fixes here. One, correctly
treat blocks as a context where we need to use local-name mangling using
the new isLocalContainerContext helper. Two, make
CXXNameMangler::manglePrefix handle local names in a consistent way.
Three, extend CXXNameMangler::mangleLocalName so it can mangle a block
correctly.
llvm-svn: 185450
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Blocks, like lambdas, can be written in contexts which are required to be
treated as the same under ODR. Unlike lambdas, it isn't possible to actually
take the address of a block, so the mangling of the block itself doesn't
matter. However, objects like static variables inside a block do need to
be mangled in a consistent way.
There are basically three components here. One, block literals need a
consistent numbering. Two, objects/types inside a block literal need
to be mangled using it. Three, objects/types inside a block literal need
to have their linkage computed correctly.
llvm-svn: 185372
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changes the mangling of local static variables/etc. inside blocks
to do something simple and sane. This avoids depending on the way we mangle
blocks, which isn't really appropriate here.
John, please take a look at this to make sure the mangling I chose is sane.
Fixes <rdar://problem/14074423>.
llvm-svn: 184780
|
|
|
|
|
|
|
|
|
|
|
|
| |
to provide proper overloading, and also prevents mangling conflicts with
template arguments of protocol-qualified type.
This is a non-backward-compatible mangling change, but per discussion with
John, the benefits outweigh this cost.
Fixes <rdar://problem/14074822>.
llvm-svn: 184250
|
|
|
|
|
|
| |
Found by skimming over lcov report.
llvm-svn: 184150
|
|
|
|
| |
llvm-svn: 183942
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
a lambda.
Bug #1 is that CGF's CurFuncDecl was "stuck" at lambda invocation
functions. Fix that by generally improving getNonClosureContext
to look through lambdas and captured statements but only report
code contexts, which is generally what's wanted. Audit uses of
CurFuncDecl and getNonClosureAncestor for correctness.
Bug #2 is that lambdas weren't specially mapping 'self' when inside
an ObjC method. Fix that by removing the requirement for that
and using the normal EmitDeclRefLValue path in LoadObjCSelf.
rdar://13800041
llvm-svn: 181000
|
|
|
|
|
|
|
|
|
| |
It's a kind of implicit conversion, which we generally drop, but
more importantly it's got very specific placement requirements.
rdar://13617051
llvm-svn: 179254
|
|
|
|
|
|
|
|
|
| |
The original test case here was mangling a type name for TBAA,
but we can provoke this in C++11 easily enough.
rdar://13434937
llvm-svn: 179153
|
|
|
|
|
|
|
|
|
|
|
|
| |
a normal cleanup when entering a @try or @synchronized to
ensure that we clean that up if an exception is triggered.
Apparently GCC did this, so it's hard to argue that we shouldn't
do at least as much.
rdar://12364847
llvm-svn: 178599
|
|
|
|
|
|
|
|
|
|
|
|
| |
to an out-parameter using the indirect-writeback conversion,
and we copied the current value of the variable to the temporary,
make sure that we register an intrinsic use of that value with
the optimizer so that the value won't get released until we have
a chance to retain it.
rdar://13195034
llvm-svn: 177813
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was causing correctness issues for ARC and the static analyzer when a
function template has "consumed" Objective-C object parameters (i.e.
parameters that will be released by the function before returning).
The fix is threefold:
(1) Actually copy over the attributes from old ParmVarDecls to new ones.
(2) Have Sema::BuildFunctionType only work for building FunctionProtoTypes,
which it was doing anyway. This allows us to pass an ExtProtoInfo
instead of a plain ExtInfo and several flags.
(3) Drop param attributes as part of StripImplicitInstantiation, which is
used when an implicit instantiation is followed by an explicit one.
<rdar://problem/12685622>
llvm-svn: 176728
|
|
|
|
| |
llvm-svn: 176433
|
|
|
|
|
|
|
|
|
| |
and be sure to apply them whether or not the debugger gave
us a method declaration.
rdar://12565338
llvm-svn: 176432
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
whether we already have a method. Fixes a bug where we were
failing to properly contextually convert a message receiver
during template instantiation.
As a side-effect, we now actually perform correct method lookup
after adjusting a message-send to integral or non-ObjC pointer
types (legal outside of ARC).
rdar://13305374
llvm-svn: 176339
|
|
|
|
| |
llvm-svn: 176145
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These are two related changes (one in llvm, one in clang).
LLVM:
- rename address_safety => sanitize_address (the enum value is the same, so we preserve binary compatibility with old bitcode)
- rename thread_safety => sanitize_thread
- rename no_uninitialized_checks -> sanitize_memory
CLANG:
- add __attribute__((no_sanitize_address)) as a synonym for __attribute__((no_address_safety_analysis))
- add __attribute__((no_sanitize_thread))
- add __attribute__((no_sanitize_memory))
for S in address thread memory
If -fsanitize=S is present and __attribute__((no_sanitize_S)) is not
set llvm attribute sanitize_S
llvm-svn: 176076
|
|
|
|
|
|
|
|
| |
This reverts commit 176009.
The commit is a likely cause of several buildbot failures.
llvm-svn: 176044
|
|
|
|
|
|
|
| |
This is an ongoing process. Any command line option which a back-end cares about
should be added here.
llvm-svn: 176009
|
|
|
|
|
|
| |
attributes on the call/invoke instructions.
llvm-svn: 175878
|
|
|
|
|
|
|
|
|
|
| |
arguments in function prologue is done
with objc_StoreStrong to pair it with
similar objc_StoreStrong for release in function
epilogue. This is done with -O0 only.
// rdar://13145317
llvm-svn: 175698
|
|
|
|
| |
llvm-svn: 175652
|
|
|
|
|
|
| |
function attributes.
llvm-svn: 175606
|
|
|
|
|
|
|
| |
The back-end will use these values to reconfigure code generation for different
features.
llvm-svn: 175308
|
|
|
|
|
|
|
|
| |
ObjC++ alongside ObjC.
\end paranoia.
llvm-svn: 174471
|
|
|
|
|
|
|
|
| |
Previously we were only handling non-array fields of class type.
Testcases derived from a patch by WenHan Gu.
llvm-svn: 174146
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We were previously hard-coding a particular field index. This was
fine before (because we were obviously guaranteed the presence
of a copy/dispose member) except for (1) alignment padding and
(2) future extensions adding extra members to the header, such
as the extended-layout pointer.
Note that we only introduce the extended-layout pointer in the
presence of structs. (We also seem to be introducing it even
in the presence of an all-non-object layout, but that's a
different potential issue.)
llvm-svn: 173122
|
|
|
|
|
|
| |
produce more inline layout metadata. // rdar://12752901
llvm-svn: 172683
|
|
|
|
| |
llvm-svn: 172126
|
|
|
|
|
|
|
| |
an objectiveC object, use objc_exception_throw
to raise the exception. // rdar://12605907
llvm-svn: 172091
|
|
|
|
| |
llvm-svn: 170354
|
|
|
|
|
|
| |
This reverts commit r170344. Doesn't even compile.
llvm-svn: 170351
|
|
|
|
| |
llvm-svn: 170344
|
|
|
|
|
|
| |
mode.
llvm-svn: 169138
|
|
|
|
|
|
|
|
|
|
|
| |
objc_loadWeak. This retains and autorelease the weakly-refereced
object. This hidden autorelease sometimes makes __weak variable alive even
after the weak reference is erased, because the object is still referenced
by an autorelease pool. This patch overcomes this behavior by loading a
weak object via call to objc_loadWeakRetained(), followng it by objc_release
at appropriate place, thereby removing the hidden autorelease. // rdar://10849570
llvm-svn: 168740
|
|
|
|
|
|
|
|
|
| |
if the type of the value is a non-trivial class type. Fixes PR14318.
(There's a minor ObjC++ language change here: given that we can't save the
value, the type of the assignment expression is void in such cases.)
llvm-svn: 167884
|
|
|
|
|
|
| |
refactor the code.
llvm-svn: 167436
|
|
|
|
|
|
|
| |
checks to enable. Remove frontend support for -fcatch-undefined-behavior,
-faddress-sanitizer and -fthread-sanitizer now that they don't do anything.
llvm-svn: 167413
|
|
|
|
|
|
|
|
|
| |
extern "C", its method definitions must be IRGen'ed
before meta-data for class is generated. Otherwise,
IRGen crashes (to say the least).
// rdar://12581683
llvm-svn: 166809
|
|
|
|
|
|
|
|
|
|
|
| |
combination of a load+objc_release; this is generally better
for tools that try to track why values are retained and
released. Also use objc_storeStrong when copying a block
(again, only at -O0), which requires us to do a preliminary
store of null in order to compensate for objc_storeStrong's
assign semantics.
llvm-svn: 166085
|
|
|
|
| |
llvm-svn: 164167
|
|
|
|
|
|
|
|
|
|
|
| |
to overwrite objects that might have been allocated into the type's
tail padding. This patch is missing some potential optimizations where
the destination is provably a complete object, but it's necessary for
correctness.
Patch by Jonathan Sauer.
llvm-svn: 162254
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
was mistakenly classifying dynamic_casts which might throw as having no side
effects.
Switch it from a visitor to a switch, so it is kept up-to-date as future Expr
nodes are added. Move it from ExprConstant.cpp to Expr.cpp, since it's not
really related to constant expression evaluation.
Since we use HasSideEffect to determine whether to emit an unused global with
internal linkage, this has the effect of suppressing emission of globals in
some cases.
I've left many of the Objective-C cases conservatively assuming that the
expression has side-effects. I'll leave it to someone with better knowledge
of Objective-C than mine to improve them.
llvm-svn: 161388
|
|
|
|
|
|
| |
this-adjustment thunk in ARC++.
llvm-svn: 161014
|
|
|
|
|
|
|
| |
Fixes PR13314, clang crashing on blocks refering to an enclosing local
when the enclosing function returns void.
llvm-svn: 160089
|