| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
llvm-svn: 212453
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The MS ABI RTTI emission code would choose names for IR types like
%"MSRTTITypeDescriptor\02". This name is undesirable because it
requires escaping; the underlying reason for this is that the name is
unprintable. Fix this by naming it %rtti.TypeDescriptor2.
While here, stop trying to do lookups in the LLVM Module's type table.
Instead, store the IR types in MicrosoftCXXABI. Lookups by name aren't
particularly fast.
llvm-svn: 212439
|
|
|
|
|
|
|
| |
the key functions table. Don't hold references to anything within that table
across such an access.
llvm-svn: 212437
|
|
|
|
|
|
| |
expression because it uses 'this'. Inspired by PR20219 comment#2.
llvm-svn: 212433
|
|
|
|
|
|
|
| |
Codegen is still missing (and I won't work on that), but __leave is now
as implemented as __try and friends.
llvm-svn: 212425
|
|
|
|
|
|
|
|
|
| |
Give scope a SEHTryScope bit, set that in ParseSEHTry(), and let Sema
walk the scope chain to find the SEHTry parent on __leave statements.
(They are rare enough that it seems better to do the walk instead of
giving Scope a SEHTryParent pointer -- this is similar to AtCatchScope.)
llvm-svn: 212422
|
|
|
|
| |
llvm-svn: 212421
|
|
|
|
| |
llvm-svn: 212418
|
|
|
|
|
|
| |
Removed that from the RUN line, fixed obvious C++isms in the code, and moved some C++ tests into MicrosoftExtensions.cpp instead. As a drive-by, changed the line endings for MicrosoftExtensions.c to be LF instead of CRLF.
llvm-svn: 212417
|
|
|
|
| |
llvm-svn: 212416
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This gives us back the test coverage we lost when I made
MicrosoftExtensions.c x86-only.
Reviewers: majnemer
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D4401
llvm-svn: 212414
|
|
|
|
| |
llvm-svn: 212393
|
|
|
|
| |
llvm-svn: 212392
|
|
|
|
|
|
| |
This fixes http://llvm.org/PR20204.
llvm-svn: 212389
|
|
|
|
| |
llvm-svn: 212383
|
|
|
|
|
|
|
|
| |
This adds support for simple MSVC compatibility mode intrinsics. These
intrinsics are simple in that they are either directly passed through to the
annotated MSBuiltin intrinsic or they mirror existing GCC builtins.
llvm-svn: 212378
|
|
|
|
| |
llvm-svn: 212373
|
|
|
|
| |
llvm-svn: 212353
|
|
|
|
| |
llvm-svn: 212339
|
|
|
|
| |
llvm-svn: 212338
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: rafael, rnk
Reviewed By: rnk
Subscribers: rnk, cfe-commits
Differential Revision: http://reviews.llvm.org/D4357
llvm-svn: 212327
|
|
|
|
|
|
|
|
| |
cygming.
This makes unittests run with BUILD_SHARED_LIBS on DLL platforms.
llvm-svn: 212316
|
|
|
|
| |
llvm-svn: 212312
|
|
|
|
| |
llvm-svn: 212311
|
|
|
|
| |
llvm-svn: 212285
|
|
|
|
|
|
|
| |
Adds support for __builtin_arm_isb. Also corrects DSB and ISB instructions
modelling by adding has-side-effects property.
llvm-svn: 212277
|
|
|
|
|
|
| |
Patch by: Moritz Roth
llvm-svn: 212264
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Because a global created by GetOrCreateLLVMGlobal() is not finalised until later viz:
extern char a[];
char f(){ return a[5];}
char a[10];
Change MangledDeclNames to use a MapVector rather than a DenseMap so that the
Metadata is output in order of original declaration, so to make deterministic
and improve human readablity.
Differential Revision: http://reviews.llvm.org/D4176
llvm-svn: 212263
|
|
|
|
|
|
| |
Reviewed at http://reviews.llvm.org/D4364
llvm-svn: 212261
|
|
|
|
| |
llvm-svn: 212260
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Itanium rules are not appropriate for the MS ABI. RTTI data is
_never_ imported and thus is never available_externally. It is either
internal (if the type's linkage is internal) or linkonce_odr.
This also means that classes which inherit from dllimport'd bases force
their translation unit to duplicate the entirety of the RTTI data of
that base.
Interestingly, the complete object locator can never be referenced by
translation units which import the class.
This fixes PR20106.
llvm-svn: 212256
|
|
|
|
|
|
|
|
|
| |
This corrects SVN r212196's naming change to use the proper prefix of
`__builtin_arm_` instead of `__builtin_`.
Thanks to Yi Kong for pointing out the incorrect naming!
llvm-svn: 212253
|
|
|
|
|
|
|
|
|
|
| |
r210091 made initialization checking more strict in c++11 mode. LWG2193 is
about changing standard libraries to still be valid under these new rules,
but older libstdc++ (e.g. libstdc++4.6 in -D_GLIBCXX_DEBUG=1 mode, or stlport)
do not implement that yet. So fall back to the C++03 semantics for container
classes in system headers below the std namespace.
llvm-svn: 212238
|
|
|
|
|
|
|
|
|
|
| |
This extends the target builtin support to allow language specific annotations
(i.e. LANGBUILTIN). This is to allow MSVC compatibility whilst retaining the
ability to have EABI targets use a __builtin_ prefix. This is merely to allow
uniformity in the EABI case where the unprefixed name is provided as an alias in
the header.
llvm-svn: 212196
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
See https://code.google.com/p/address-sanitizer/issues/detail?id=299 for the
original feature request.
Introduce llvm.asan.globals metadata, which Clang (or any other frontend)
may use to report extra information about global variables to ASan
instrumentation pass in the backend. This metadata replaces
llvm.asan.dynamically_initialized_globals that was used to detect init-order
bugs. llvm.asan.globals contains the following data for each global:
1) source location (file/line/column info);
2) whether it is dynamically initialized;
3) whether it is blacklisted (shouldn't be instrumented).
Source location data is then emitted in the binary and can be picked up
by ASan runtime in case it needs to print error report involving some global.
For example:
0x... is located 4 bytes to the right of global variable 'C::array' defined in '/path/to/file:17:8' (0x...) of size 40
These source locations are printed even if the binary doesn't have any
debug info.
This is an ABI-breaking change. ASan initialization is renamed to
__asan_init_v4(). Pre-built libraries compiled with older Clang will not work
with the fresh runtime.
llvm-svn: 212188
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This patch adds minimal coverage for each -mcpu value to ensure that none of them can pass an empty string in -mabi.
Prior to r212176, many -mcpu values would trigger this.
Differential Revision: http://reviews.llvm.org/D4272
llvm-svn: 212182
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
For example: s/MIPS32-EB-AS/MIPS32R2-EB-AS/ since it is for MIPS32r2 not MIPS32.
This reduces the noise in my next Clang patch.
Differential Revision: http://reviews.llvm.org/D4271
llvm-svn: 212177
|
|
|
|
|
|
| |
not from the CPU name. This approach is closer to the method used by gcc driver.
llvm-svn: 212176
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ARMv8 adds (to both AArch32 and AArch64) acquiring and releasing
variants of the exclusive operations, in line with the C++11 memory
model.
This adds support for two new intrinsics to expose them to C & C++
developers directly: __builtin_arm_ldaex and __builtin_arm_stlex, in
direct analogy with the versions with no implicit barrier.
rdar://problem/15885451
llvm-svn: 212175
|
|
|
|
|
|
|
| |
Also document that the function is a "best-effort" facility to extract source
ranges from limited AST type location info.
llvm-svn: 212174
|
|
|
|
|
|
|
|
|
|
| |
The backend *can* cope with all of these now, so Clang should give it the
chance. On CPUs without cmpxchg16b (e.g. the original athlon64) LLVM can reform
the libcalls.
rdar://problem/13496295
llvm-svn: 212173
|
|
|
|
|
|
|
|
|
| |
C++ [basic.start.main]p1: "It shall have a return type of type int"
ISO C is also clear about this, so only accept 'int' with qualifiers in GNUMode
C.
llvm-svn: 212171
|
|
|
|
|
|
| |
parameter.
llvm-svn: 212170
|
|
|
|
|
|
|
|
|
|
| |
Fixes PR20110, where Clang hits an assertion failure when it expects that the
sub-expression of a bit cast to pointer to also be a pointer, but gets a value
instead.
Differential Revision: http://reviews.llvm.org/D4280
llvm-svn: 212160
|
|
|
|
|
|
| |
-Asserts.
llvm-svn: 212144
|
|
|
|
|
|
| |
This test was supposed to go in with r212125.
llvm-svn: 212139
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are slight differences between /GR- and -fno-rtti which made
mapping one to the other inappropriate.
-fno-rtti disables dynamic_cast, typeid, and does not emit RTTI related
information for the v-table.
/GR- does not generate complete object locators and thus will not
reference them in vftables. However, constructs like dynamic_cast and
typeid are permitted.
This should bring our implementation of RTTI up to semantic parity with
MSVC modulo bugs.
llvm-svn: 212138
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The pointer for a class's RTTI data comes right before the VFTable but
has no name. To be properly compatible with this, we do the following:
* Create a single GlobalVariable which holds the contents of the VFTable
_and_ the pointer to the RTTI data.
* Create a GlobalAlias, with appropriate linkage/visibility, that points
just after the RTTI data pointer. This ensures that the VFTable
symbol will always refer to VFTable data.
* Create a Comdat with a "Largest" SelectionKind and stick the private
GlobalVariable in it. By transitivity, the GlobalAlias will be a
member of the Comdat group. Using "Largest" ensures that foreign
definitions without an RTTI data pointer will _not_ be chosen in the
final linked image.
Whether or not we emit RTTI data depends on several things:
* The -fno-rtti flag implies that we should never not emit a pointer to
RTTI data before the VFTable.
* __declspec(dllimport) brings in the VFTable from a remote DLL. Use an
available_externally GlobalVariable to provide a local definition of
the VFTable. This means that we won't have any available_externally
definitions of things like complete object locators. This is
acceptable because they are never directly referenced.
To my knowledge, this completes the implementation of MSVC RTTI code
generation.
Further semantic work should be done to properly support /GR-.
llvm-svn: 212125
|
|
|
|
|
|
|
|
|
|
| |
These flags enable behavior in MSVC that Clang has by default.
/Zc:inline essentially marks all COMDATs as discardable. In LLVM
parlance, this means using linkonce_odr linkage, which is what we
already do.
llvm-svn: 212117
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
in Clang.
Currently, we fail with an error.
Reviewers: rafael
Reviewed By: rafael
Subscribers: rnk, cfe-commits
Differential Revision: http://reviews.llvm.org/D4347
llvm-svn: 212110
|