| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
llvm-svn: 210780
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The backing store of thread local variables is internal for OS X and all
accesses must go through the thread wrapper.
However, individual TUs may have inlined through the thread wrapper.
To fix this, give the thread wrapper functions WeakAnyLinkage. This
prevents them from getting inlined into call-sites.
This fixes PR19989.
llvm-svn: 210632
|
|
|
|
| |
llvm-svn: 210448
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add driver and frontend support for the GCC -Wframe-larger-than=bytes warning.
This is the first GCC-compatible backend diagnostic built around LLVM's
reporting feature.
This commit adds infrastructure to perform reverse lookup from mangled names
emitted after LLVM IR generation. We use that to resolve precise locations and
originating AST functions, lambdas or block declarations to produce seamless
codegen-guided diagnostics.
An associated change, StringMap now maintains unique mangled name strings
instead of allocating copies. This is a net memory saving in C++ and a small
hit for C where we no longer reuse IdentifierInfo storage, pending further
optimisation.
llvm-svn: 210293
|
|
|
|
| |
llvm-svn: 210214
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GetAddrOfConstantStringFromLiteral.
Share mode code between these functions and re-structure them in a way
which shows how similar they actually are. The latter function works well
with literals of multi-byte chars and does a GlobalVariable name mangling
(if global strings are non-writable).
No functionality change.
llvm-svn: 210212
|
|
|
|
| |
llvm-svn: 210206
|
|
|
|
|
|
| |
Aliases in llvm now hold an arbitrary expression.
llvm-svn: 210063
|
|
|
|
|
|
|
|
|
| |
The only remaining user didn't actually use the non-dynamic storage facility
this class provides.
The std::string is transitional and likely to be StringRefized shortly.
llvm-svn: 210058
|
|
|
|
| |
llvm-svn: 209826
|
|
|
|
|
|
|
|
|
| |
Clang knows about the sanitizer blacklist and it makes no sense to
add global to the list of llvm.asan.dynamically_initialized_globals if it
will be blacklisted in the instrumentation pass anyway. Instead, we should
do as much blacklisting as possible (if not all) in the frontend.
llvm-svn: 209789
|
|
|
|
|
|
|
|
|
|
|
|
| |
MSVC doesn't export these functions, so trying to import them doesnt' work.
Also, don't let any dll attributes on the CXXDestructorDecl influence the
thunk's linkage -- they should always be linkonce_odr.
This takes care of the FIXME's for this in Nico's tests.
Differential Revision: http://reviews.llvm.org/D3930
llvm-svn: 209706
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Initializers of global data that can appear multiple TUs (static data
members of class templates or __declspec(selectany) data) are now in a
comdat group keyed on the global variable being initialized. On
non-Windows platforms, this is a code size and startup time
optimization. On Windows, this is necessary for ABI compatibility with
MSVC.
Fixes PR16959.
Reviewers: rsmith
Differential Revision: http://reviews.llvm.org/D3811
llvm-svn: 209555
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was fairly broken. For example,
@__dso_handle would or would not get an unnamed_addr depending on how many
global destructors were used in a translation unit.
The consensus was that not every runtime variable is unnamed_addr and that
__dso_handle handle should not be, so just don't add unnamed_addr in
CreateRuntimeVariable.
llvm-svn: 209484
|
|
|
|
| |
llvm-svn: 209272
|
|
|
|
|
|
|
|
|
| |
behavior on mismatch. The AutoUpgrader will drop incompatible debug info
any way and also emit a warning diagnostic for it.
rdar://problem/16926122
llvm-svn: 209182
|
|
|
|
| |
llvm-svn: 209077
|
|
|
|
| |
llvm-svn: 209074
|
|
|
|
|
|
| |
No functionality change.
llvm-svn: 209038
|
|
|
|
|
|
|
|
|
|
| |
Now that llvm cannot represent alias cycles, we have to diagnose erros just
before trying to close the cycle. This degrades the errors a bit. The real
solution is what it was before: if we want to provide good errors for these
cases, we have to be able to find a clang level decl given a mangled name
and produce the error from Sema.
llvm-svn: 209008
|
|
|
|
| |
llvm-svn: 208984
|
|
|
|
|
|
|
|
| |
This is a step towards handling these attributes on classes (PR11170).
Differential Revision: http://reviews.llvm.org/D3772
llvm-svn: 208925
|
|
|
|
|
|
| |
No functionality change.
llvm-svn: 208808
|
|
|
|
| |
llvm-svn: 208717
|
|
|
|
|
|
| |
reverting a olista01s change, and this pollution made it upstream during the revert checkin :/ Sorryemacs -nw lib/CodeGen/CodeGenModule.cpp
llvm-svn: 208426
|
|
|
|
|
|
| |
registers'). This is a followon commit from r208413 which broke the LLVM bots.
llvm-svn: 208422
|
|
|
|
| |
llvm-svn: 208374
|
|
|
|
|
|
| |
Use more specific type, update comments and name style.
llvm-svn: 208328
|
|
|
|
| |
llvm-svn: 208320
|
|
|
|
| |
llvm-svn: 208077
|
|
|
|
|
|
| |
Warn if an alias requests a section other than the aliasee section.
llvm-svn: 207997
|
|
|
|
| |
llvm-svn: 207991
|
|
|
|
|
|
| |
Also add basic cpp ABI tests where they differ from C ABI output.
llvm-svn: 207834
|
|
|
|
|
|
|
| |
This includes the addition of the virtual function:
TargetCodeGenInfo::EmitTargetMD()
llvm-svn: 207832
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Previously, we would generate a single name for all reference
temporaries and allow LLVM to rename them for us. Instead, number the
reference temporaries as we build them in Sema.
Reviewers: rsmith
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D3554
llvm-svn: 207776
|
|
|
|
|
|
|
| |
Reference temporaries inherited many properties from the variable that
they correspond to but visibility wasn't one of them.
llvm-svn: 207496
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
A reference temporary should inherit the linkage of the variable it
initializes. Otherwise, we may hit cases where a reference temporary
wouldn't have the same value in all translation units.
Reviewers: rsmith
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D3515
llvm-svn: 207451
|
|
|
|
|
|
|
|
|
|
| |
Almost all linkage calculation for VarDecls occured inside of
GetLLVMLinkageVarDefinition except for static data members. Centralize
the logic so that it can be more readily reused.
No functionality change.
llvm-svn: 207241
|
|
|
|
|
|
|
|
|
|
| |
It turns out that linkage and visibility have rather similar logic for
both functions and non-variable globals. Split the calculation out so
that both sides may share this code.
No functionality change.
llvm-svn: 207239
|
|
|
|
|
|
| |
Cleanup only.
llvm-svn: 206709
|
|
|
|
|
|
|
|
|
| |
Update clang to use the InstrProfReader from LLVM to read
instrumentation based profile data. This also switches us from the
naive text format to the binary format, since that's what's
implemented in the reader.
llvm-svn: 206658
|
|
|
|
|
|
|
|
|
| |
This adds a warning that triggers when profile data doesn't match for
the source that's being compiled with -fprofile-instr-use=. This fires
only once per translation unit, as warning on every mismatched
function would be quite noisy.
llvm-svn: 206322
|
|
|
|
|
|
|
|
| |
Emitting the PGO initialization in EmitGlobalFunctionDefinition is
inefficient, since this only has an effect once per module. We move
this to Release() with the rest of the once-per-module logic.
llvm-svn: 205977
|
|
|
|
|
|
| |
No functionality change.
llvm-svn: 205972
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
MSVC always emits inline functions marked with the extern storage class
specifier. The result is something similar to the opposite of
__attribute__((gnu_inline)).
This extension is also available in C.
This fixes PR19264.
Reviewers: rnk, rsmith
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D3207
llvm-svn: 205485
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Clang implements the part of the ARM ABI saying that certain functions
(e.g., constructors and destructors) return "this", but Apple's version of
gcc and llvm-gcc did not. The libstdc++ dylib on iOS 5 was built with
llvm-gcc, which means that clang cannot safely assume that code from the C++
runtime will correctly follow the ABI. It is also possible to run into this
problem when linking with other libraries built with gcc or llvm-gcc. Even
though there is no way to reliably detect that situation, it is most likely
to come up when targeting older versions of iOS. Disabling the optimization
for any code targeting iOS 5 solves the libstdc++ problem and has a reasonably
good chance of fixing the issue for other older libraries as well.
<rdar://problem/16377159>
llvm-svn: 205272
|
|
|
|
|
|
| |
on a function.
llvm-svn: 205255
|
|
|
|
|
|
|
|
|
|
|
| |
This adds Clang support for the ARM64 backend. There are definitely
still some rough edges, so please bring up any issues you see with
this patch.
As with the LLVM commit though, we think it'll be more useful for
merging with AArch64 from within the tree.
llvm-svn: 205100
|
|
|
|
|
|
|
|
|
|
|
|
| |
The peculiarities of C99 create scenario where an LLVM IR function
declaration may need to be replaced with a definition baring a different
type because the prototype and definition are not required to agree.
However, we were not properly deferring this when it occurred.
This fixes PR19280.
llvm-svn: 205099
|
|
|
|
|
|
|
| |
This produces valid IR now that llvm rejects aliases to weak aliases and warns
the user that the resolution is not changed if the weak alias is overridden.
llvm-svn: 204935
|