| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
target_link_libraries() and LLVM_LINK_COMPONENTS.
I will prune redundant dependencies later.
llvm-svn: 196800
|
| |
|
|
|
|
| |
LLVM_LINK_COMPONENTS.
llvm-svn: 196798
|
| |
|
|
|
|
|
| |
Thread an optional GV down to EmitGlobalFunctionDefinition so that it can
avoid the lookup when we already know the corresponding llvm global value.
llvm-svn: 196789
|
| |
|
|
|
|
|
|
|
| |
We can reuse it to avoid a DenseMap+StringMap lookup to find if it was already
emitted or not.
This fixes a 2010 TODO.
llvm-svn: 196785
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With this patch we output the in the order
C2
C1
D2
D1
D0
Which means that a destructor or constructor that call another is output after
the callee. This is a bit easier to read IHMO and a tiny bit more efficient
as we don't put a decl in DeferredDeclsToEmit.
llvm-svn: 196784
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Specifically disable it for nested braced lists as it commonly can look
really weird. Eventually, we'll want to become smarter and format some of
the nested lists better.
Before:
SomeStruct my_struct_array = {
{ aaaaaa, aaaaaaaa, aaaaaaaaaa, aaaaaaaaa, aaaaaaaaa,
aaaaaaaaaa, aaaaaaaaaa, aaaaaaa, aaa },
{ aaaa, aaaa, aaaa, aaaa, aaaa, aaaa, aaaa, aaa },
{ aaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaaaa,
aaaaaaaaaaaa, a, aaaaaaaaaa,
aaaaaaaaa, aaa },
};
After:
SomeStruct my_struct_array = {
{ aaaaaa, aaaaaaaa, aaaaaaaaaa, aaaaaaaaa, aaaaaaaaa, aaaaaaaaaa,
aaaaaaaaaaaa, aaaaaaa, aaa },
{ aaaa, aaaa, aaaa, aaaa, aaaa, aaaa, aaaa, aaa },
{ aaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaaaa,
aaaaaaaaaaaa, a, aaaaaaaaaa, aaaaaaaaa, aaa },
};
llvm-svn: 196783
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Testing has revealed that large integral constants (i.e. > INT64_MAX)
are always mangled as-if they are negative, even in places where it
would not make sense for them to be negative (like non-type template
parameters of type unsigned long long).
To address this, we change the way we model number mangling: always
mangle as-if our number is an int64_t. This should result in correct
results when we have large unsigned numbers.
N.B. Bizarrely, things that are 32-bit displacements like vbptr offsets
are mangled as-if they are unsigned 32-bit numbers. This is a pretty
egregious waste of space, it would be a 4x savings if we could mangle it
like a signed 32-bit number. Instead, we explicitly cast these
displacements to uint32_t and let the mangler proceed.
llvm-svn: 196771
|
| |
|
|
| |
llvm-svn: 196757
|
| |
|
|
|
|
|
|
| |
Before this patch GetOrCreateLLVMFunction would add a decl to
DeferredDeclsToEmit even when it was being called by the function trying to
emit that decl.
llvm-svn: 196753
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
While testing our ability to mangle large constants (PR18175), I
incidentally discovered that we did not properly mangle enums correctly.
Previously, we would append the width of the enum in bytes after the
type-tag differentiator.
This would mean "enum : short" would be mangled as 'W2' while "enum :
char" would be mangled as 'W1'. Upon testing this with several versions
of MSVC, I found that this did not match their behavior: they always use
'W4'.
N.B. Quick testing uncovered that undname allows different numbers to
follow the 'W' in the following way:
'W0' -> "enum char"
'W1' -> "enum unsigned char"
'W2' -> "enum short"
'W3' -> "enum unsigned short"
'W4' -> "enum"
'W5' -> "enum unsigned int"
'W6' -> "enum long"
'W7' -> "enum unsigned long"
However this scheme appears abandoned, I cannot get MSVC to trigger it.
Furthermore, it's incomplete: it doesn't handle "bool" or "long long".
llvm-svn: 196752
|
| |
|
|
|
|
|
| |
int32_t vminv_s32(int32x2_t a)
which should be compiled into SMINP Vd.2S,Vn.2S,Vm.2S
llvm-svn: 196750
|
| |
|
|
| |
llvm-svn: 196740
|
| |
|
|
| |
llvm-svn: 196727
|
| |
|
|
|
|
|
|
| |
We already support using "r" on 64-bit values (a GPRPair is
allocated), but Sema doesn't know this yet so issues a warning. This
should fix it.
llvm-svn: 196724
|
| |
|
|
|
|
| |
argh!
llvm-svn: 196722
|
| |
|
|
|
|
| |
Add back the test that was triggering the assertion (which I removed mistakenly thinking it was triggering just a warning and not an assertion). My error was brought to my attention by Rafael (Thanks!).
llvm-svn: 196721
|
| |
|
|
|
|
| |
architecture and PIC flag.
llvm-svn: 196720
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Clang outputs LLVM one top level decl at a time. This combined with the
visibility computation code looking for the newest NamespaceDecl would cause
it to produce different results for nested namespaces.
The two options for producing consistent results are
* Delay codegen of anything inside a namespace until the end of the file.
* Don't look for the newest NamespaceDecl.
This patch implements the second option.
This matches the gcc behavior too.
llvm-svn: 196712
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Employed the following refactorings:
- Renamed some functions
- Introduced explaining variables
- Cleaned up & added comments
- Used Optional<unsigned> for return value instead of an out parameter
- Added assertions
- Constified a few member functions
No functionality change.
All regressions pass.
llvm-svn: 196662
|
| |
|
|
|
|
|
|
|
|
|
|
| |
vararg.
This can happen when we're trying to emit a thunk with available_externally
linkage with optimization enabled but bail because it doesn't make sense
for vararg functions.
PR18098.
llvm-svn: 196658
|
| |
|
|
|
|
| |
assert(sanity()) reads so much better than preprocessor conditional blocks.
llvm-svn: 196657
|
| |
|
|
|
|
| |
Code in headers shouldn't be conditional on the build configuration.
llvm-svn: 196656
|
| |
|
|
|
|
| |
3-state enum.
llvm-svn: 196648
|
| |
|
|
|
|
|
|
|
| |
There was already a condition earlier in the function so just place the check
there.
Cleanup only.
llvm-svn: 196647
|
| |
|
|
|
|
|
|
|
|
|
|
| |
__builtin_types_compatible_p() isn't a C++ type trait at all, rather a GNU C
special-case, so it's fine to use BoolTy the default return type for binary
type traits.
This brings BTT in line with other arities that already default to BoolTy.
Cleanup only, no change in behaviour.
llvm-svn: 196646
|
| |
|
|
|
|
|
|
| |
objc_designated_initializer
attribute is acceptable.
llvm-svn: 196644
|
| |
|
|
|
|
|
| |
instantiation appears in a non-enclosing namespace (the previous diagnostic
talked about the C++98 rule even in C++11 mode).
llvm-svn: 196642
|
| |
|
|
|
|
| |
and MIPS64. From Brad Smith.
llvm-svn: 196630
|
| |
|
|
|
|
|
|
|
| |
attribute in sema and issuing a variety of diagnostics lazily
for misuse of this attribute (and what to do) when converting
from CF types to ObjectiveC types (and vice versa).
// rdar://15499111
llvm-svn: 196629
|
| |
|
|
|
|
| |
Also includes a minor refactor with no functional change.
llvm-svn: 196627
|
| |
|
|
|
|
|
|
|
|
|
|
| |
- krait processor currently modeled with the same features as A9.
- Krait processor additionally has VFP4 (fused multiply add/sub)
and hardware division features enabled.
- krait has currently the same Schedule model as A9
- krait cpu flag is not recognized by the GNU assembler yet,
it is replaced with march=armv7-a to avoid a lower march
from being used.
llvm-svn: 196618
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit adds the flag '-via-file-asm' to the clang driver. The
purpose of this flag is to have a way to test that clang can consume
the assembly code that it outputs. When passed this flag, clang will
generate a temporary file that contains the assembly output from the
compile step. This assembly file will then be consumed by either the
integrated assembler or the external assembler. To test that the
integrated assembler can consume its own output compile with:
$ clang -integrated-assembler -via-file-asm
Without the '-via-file-asm' flag, clang would directly create the
object file when using the integrated assembler. With the flag it
will first create the temporary assembly file and then read that
file and assemble it with the integrated assembler.
The flow is similar to -save-temps, except that it only effects
the assembly input and the temporary file is not saved.
llvm-svn: 196606
|
| |
|
|
|
|
|
|
|
|
| |
MS-ABI adds padding before *every* vbase if the last field in a record
is a bit-field. This changes clangs behavior to match. I also fix some
windows-style line endings in the test file.
Differential Revision: http://llvm-reviews.chandlerc.com/D2277
llvm-svn: 196605
|
| |
|
|
|
|
|
|
|
|
|
| |
Adds padding between bases or virtual bases in an attempt to avoid
aliasing of zero-sized sub-objects. The approach used by the ABI adds
two more bits of state. Detailed comments are in the code. Test cases
included.
Differential Revision: http://llvm-reviews.chandlerc.com/D2258
llvm-svn: 196602
|
| |
|
|
|
|
|
|
|
|
| |
This reverts commit r189090.
The original patch introduced regressions (see the added live-variables.* tests). The patch depends on the correctness of live variable analyses, which are not computed correctly. I've opened PR18159 to track the proper resolution to this problem.
The patch was a stepping block to r189746. This is why part of the patch reverts temporary destructor tests that started crashing. The temporary destructors feature is disabled by default.
llvm-svn: 196593
|
| |
|
|
|
|
| |
Microsoft extensions we do not currently support. Note that __w64 has been deprecated in MSVC since 2008.
llvm-svn: 196592
|
| |
|
|
|
|
|
| |
and call it from its only user. The linux toolchain. This saves quite
a lot of directory searching on other platforms.
llvm-svn: 196590
|
| |
|
|
| |
llvm-svn: 196587
|
| |
|
|
| |
llvm-svn: 196584
|
| |
|
|
|
|
| |
unrelated bug regarding the __has_attribute implementation. Reverting to unblock the Chrome tsan builds.
llvm-svn: 196583
|
| |
|
|
|
|
|
|
|
|
|
| |
Before:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<int> aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
[aaaaaaaaaaaa];
After:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<int>
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa[aaaaaaaaaaaa];
llvm-svn: 196582
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In order to make the migration to modules easier, it seems to be helpful
to allow a 1:1 mapping between target names of a current build system
and the corresponding C++ modules. As such targets commonly contain
characters like "-". ":" and "/", allowing arbitrary quote-escaped
strings seems to be a straightforward option.
After several offline discussions, the precise mechanisms for C++
module names especially regarding submodules and import statements has
yet to be determined. Thus, this patch only enables string literals as
names inside the module map files which can be used by automatic module
import (through #include).
Also improve the error message on missing use-declarations.
llvm-svn: 196573
|
| |
|
|
|
|
| |
of whether the initializer list is dependent.
llvm-svn: 196558
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
__declspec(align())
This patch implements required alignment in a way that makes
__declspec(align()) and #pragma pack play correctly together. In the
MS-ABI, __declspec(align()) is a hard rule and cannot be overridden by
#pragma pack. This cases each record to have two interesting alignments
"preferred alignment" (which matches Itanium's concept of alignment) and
"required alignment" which is an alignment that must never be violated,
even in the case of #pragma pack. This patch introduces the concept of
Required Alignment to the record builder and tracks/uses it
appropriately. Test cases are included.
Differential Revision: http://llvm-reviews.chandlerc.com/D2283
llvm-svn: 196549
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit changes -Wassign-enum to compare unqualified types. One could
think that this does not matter much, because who wants a value of enum type
that is const-qualified? But this breaks the intended pattern to silence this
warning with an explicit cast:
static const enum Foo z = (enum Foo) 42;
In this case, source type is 'enum Foo', and destination type is 'const enum
Foo', and if we compare qualified types, they don't match, so we used warn.
llvm-svn: 196548
|
| |
|
|
|
|
|
|
|
|
| |
the following pattern.
If 'case' expression refers to a static const variable of the correct enum
type, then we count this as a sufficient declaration of intent by the user,
so we silence the warning.
llvm-svn: 196546
|
| |
|
|
|
|
|
|
| |
This was causing us to miscompile
llvm::SymbolTableListTraits::getListOwner(), which uses data member
pointers.
llvm-svn: 196545
|
| |
|
|
| |
llvm-svn: 196538
|
| |
|
|
| |
llvm-svn: 196532
|
| |
|
|
|
|
|
|
| |
category is declared in category's primary
class's super class. Because the super class is
expected to implemented the method. // rdar://15580969
llvm-svn: 196531
|