hanchenye-llvm-project/clang/test
David Majnemer d905da4a5f MS ABI: Reference MSVC RTTI from the VFTable
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
2014-07-01 20:30:31 +00:00
..
ARCMT [analyzer] Check for NULL passed to CFAutorelease. 2014-06-21 23:50:40 +00:00
ASTMerge
Analysis Do not inline methods of C++ containers (coming from headers). 2014-06-27 01:03:05 +00:00
CXX Add missing "non-constant" diagnostic for a member call on a temporary of 2014-06-11 19:53:12 +00:00
CodeCompletion
CodeGen Enable test/CodeGen/indirect-goto.c in 64b for local arrays 2014-07-01 05:10:06 +00:00
CodeGenCUDA Move all CUDA testing inputs to Inputs/ subdirectory inside the tests. 2014-04-28 22:21:28 +00:00
CodeGenCXX MS ABI: Reference MSVC RTTI from the VFTable 2014-07-01 20:30:31 +00:00
CodeGenObjC Improve robustness of tests for module flags metadata 2014-06-19 16:10:21 +00:00
CodeGenObjCXX Improve robustness of tests for module flags metadata 2014-06-19 16:10:21 +00:00
CodeGenOpenCL Add R600 builtin codegen. 2014-06-24 20:45:01 +00:00
Coverage Fix crash caused by unnamed union or struct when doing ast-print 2014-06-20 17:08:28 +00:00
Driver clang-cl: Ignore /Zc:inline and /Zc:rvalueCast 2014-07-01 18:27:02 +00:00
FixIt Objective-C ARC. Provide diagnostic and fix-it 2014-06-26 21:22:16 +00:00
Format clang-format: Introduce style with spaces on both sides of */&. 2014-06-17 12:40:34 +00:00
Frontend Account for differences in grep implementations 2014-06-27 03:11:38 +00:00
Headers Introduce arm_acle.h supporting existing LLVM builtin intrinsics 2014-06-27 21:25:42 +00:00
Index [test] Add '-target' option to fix bot failure. 2014-06-21 18:28:44 +00:00
Integration Split out header integration tests 2014-05-04 13:00:32 +00:00
Layout Fix warning in ms-x86-vtordisp test case 2014-04-14 23:49:17 +00:00
Lexer Make MS i128 suffix test from r211446 more robust 2014-06-21 23:32:05 +00:00
Misc PR15677 - Crash in template diffing. Check that expression is evaluatable before evaluating it. 2014-07-01 04:17:53 +00:00
Modules Remove REQUIRES lines from portable tests 2014-06-25 22:46:44 +00:00
OpenMP [OPENMP] Parsing and sema analysis for 'copyprivate' clause. 2014-06-27 10:37:06 +00:00
PCH Add loop unroll pragma support 2014-06-11 17:56:26 +00:00
Parser Don't allow dllimport variables in constant initializers 2014-06-25 22:19:48 +00:00
Preprocessor Do not define __STRICT_ANSI__ in clang-cl 2014-06-30 20:36:33 +00:00
Profile CodeGen: Improve warnings about uninstrumented files when profiling 2014-06-26 01:45:07 +00:00
Rewriter Don't suppress warning about dllimport on typedefs etc. in MicrosoftExt mode 2014-05-23 20:16:41 +00:00
Sema Get arm_acle tests from r211962 working 2014-06-28 06:51:27 +00:00
SemaCUDA Move all CUDA testing inputs to Inputs/ subdirectory inside the tests. 2014-04-28 22:21:28 +00:00
SemaCXX test: move test from CodeGen to Sema 2014-06-30 02:14:37 +00:00
SemaObjC Objective-C. When we use @selector(save:), etc. there may be more 2014-06-24 17:02:19 +00:00
SemaObjCXX Fix assertion hit or bogus compiler error in cases when instantiating ObjC property accesses used with overloaded binary operators. 2014-06-19 14:45:16 +00:00
SemaOpenCL [OpenCL] Reject reqd_work_group_size(X, Y, Z) where X, Y or Z == 0. 2014-05-19 14:41:38 +00:00
SemaTemplate Fix/Improve SourceRange of explicitly defaulted members 2014-06-20 08:44:22 +00:00
TableGen
Tooling PR19601: testcase improvement 2014-05-01 19:36:13 +00:00
Unit
VFS Make -Wincomplete-umbrella go through the VFS 2014-06-25 23:53:43 +00:00
.clang-format
CMakeLists.txt Don't add examples to the check-clang dependencies unless requested 2014-06-01 02:02:23 +00:00
Makefile
TestRunner.sh
cxx-sections.data
lit.cfg Add detection of OS X relocatable SDK to compiler-rt as a lit.util function 2014-06-10 14:22:00 +00:00
lit.site.cfg.in test: Fix feature test for "native" in lit.cfg 2014-03-11 04:34:17 +00:00
make_test_dirs.pl