summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/microsoft-abi-vftables.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [MS] Mangle a hash of the main file path into anonymous namespacesReid Kleckner2018-08-171-3/+3
| | | | | | | | | | | | | | | | | | | | | | | Summary: This is needed to avoid conflicts in mangled names for codeview types in anonymous namespaces. In CodeView, types refer to each other typically through forward declarations, which contain mangled names. These names have to be unique, otherwise the debugger will look up the mangled name and find the wrong definition. Furthermore, ThinLTO will deduplicate the types, and debug info verification can fail when the types have the wrong sizes. This is PR38608. Fixes PR38609. Reviewers: majnemer, inglorion, hans Subscribers: mehdi_amini, aprantl, JDevlieghere, dexonsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D50877 llvm-svn: 340079
* [MS] Don't escape MS C++ names with \01Reid Kleckner2018-03-161-17/+17
| | | | | | | It is not needed after LLVM r327734. Now it will be easier to copy-paste IR symbol names from Clang. llvm-svn: 327738
* Make '-disable-llvm-optzns' an alias for '-disable-llvm-passes'.Chandler Carruth2016-12-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Much to my surprise, '-disable-llvm-optzns' which I thought was the magical flag I wanted to get at the raw LLVM IR coming out of Clang deosn't do that. It still runs some passes over the IR. I don't want that, I really want the *raw* IR coming out of Clang and I strongly suspect everyone else using it is in the same camp. There is actually a flag that does what I want that I didn't know about called '-disable-llvm-passes'. I suspect many others don't know about it either. It both does what I want and is much simpler. This removes the confusing version and makes that spelling of the flag an alias for '-disable-llvm-passes'. I've also moved everything in Clang to use the 'passes' spelling as it seems both more accurate (*all* LLVM passes are disabled, not just optimizations) and much easier to remember and spell correctly. This is part of simplifying how Clang drives LLVM to make it cleaner to wire up to the new pass manager. Differential Revision: https://reviews.llvm.org/D28047 llvm-svn: 290392
* CodeGen: New vtable group representation: struct of vtable arrays.Peter Collingbourne2016-12-131-15/+15
| | | | | | | | | In a future change, this representation will allow us to use the new inrange annotation on getelementptr to allow the optimizer to split vtable groups. Differential Revision: https://reviews.llvm.org/D22296 llvm-svn: 289584
* Re-land "[MS] Don't expect vftables to be provided for extern template ↵Reid Kleckner2016-06-291-3/+5
| | | | | | | | | | | | | | instantiations" Reverts r273305 and re-instates r273296. We needed to fix a bug in Sema::MarkVTableUsed to ensure that operator delete lookup occurs when the vtable is referenced. We already had a special case to look up operator delete when dllimport was used, but I think should really mark virtual destructors referenced any time the vtable is used. llvm-svn: 274147
* Revert "[MS] Don't expect vftables to be provided for extern template ↵Reid Kleckner2016-06-211-5/+3
| | | | | | | | instantiations" This reverts commit r273296, it broke the Windows self-host. llvm-svn: 273305
* [MS] Don't expect vftables to be provided for extern template instantiationsReid Kleckner2016-06-211-3/+5
| | | | | | | | | | | | | MSVC doesn't provide them. PR28223 I left behind the machinery in case we want to resurrect available_externally vftable emission to support devirtualization. Reviewers: majnemer Differential Revision: http://reviews.llvm.org/D21544 llvm-svn: 273296
* Revert "Revert r260388 "[MS ABI] Never reference dllimport'd vtables""David Majnemer2016-02-111-4/+3
| | | | | | | | | | | | | This reverts commit r260449. We would supress our emission of vftable definitions if we thought another translation unit would provide the definition because we saw an explicit instantiation declaration. This is not the case with dllimport, we want to synthesize a definition of the vftable regardless. This fixes PR26569. llvm-svn: 260548
* Revert r260388 "[MS ABI] Never reference dllimport'd vtables"Hans Wennborg2016-02-101-3/+4
| | | | | | | This caused the compiler to fail with "invalid linkage type for global declaration" (PR26569). llvm-svn: 260449
* [MS ABI] Never reference dllimport'd vtablesDavid Majnemer2016-02-101-4/+3
| | | | | | | | | | | | | Referencing a dllimported vtable is impossible in a constexpr constructor. It would be friendlier to C++ programmers if we synthesized a copy of the vftable which referenced imported virtual functions. This would let us initialize the object in a way which preserves both the intent to import functionality from another DLL while also making constexpr work. Differential Revision: http://reviews.llvm.org/D17061 llvm-svn: 260388
* [MS ABI] Don't emit RTTI descriptors for dllimport vtablesDavid Majnemer2016-02-071-0/+2
| | | | | | | | A dllimport'd vtable always points one past the RTTI data, this means that the initializer will never end up referencing the data. Our emission is a harmless waste. llvm-svn: 260062
* [opaque pointer type] update test cases for explicit pointee types on global ↵David Blaikie2015-09-111-3/+3
| | | | | | aliases llvm-svn: 247380
* __declspec is not a core Clang language extension. Instead, require ↵Aaron Ballman2015-05-261-2/+2
| | | | | | | -fms-extensions or -fborland to enable the language extension. Note: __declspec is also temporarily enabled when compiling for a CUDA target because there are implementation details relying on __declspec(property) support currently. When those details change, __declspec should be disabled for CUDA targets. llvm-svn: 238238
* MS ABI: Don't try to emit VF/VB-Tables for extern class templatesDavid Majnemer2015-03-181-3/+13
| | | | | | | | | There will be an explicit template instantiation in another translation unit which will provide the definition of the VF/VB-Tables. This fixes PR22932. llvm-svn: 232680
* Test case updates for explicit type parameter to the gep operatorDavid Blaikie2015-03-131-3/+3
| | | | llvm-svn: 232187
* Emit DeferredDeclsToEmit in a DFS order.Rafael Espindola2015-01-221-1/+1
| | | | | | | | | | | | | | Currently we emit DeferredDeclsToEmit in reverse order. This patch changes that. The advantages of the change are that * The output order is a bit closer to the source order. The change to test/CodeGenCXX/pod-member-memcpys.cpp is a good example. * If we decide to deffer more, it will not cause as large changes in the estcases as it would without this patch. llvm-svn: 226751
* Update for .ll syntax change.Rafael Espindola2015-01-061-3/+3
| | | | llvm-svn: 225303
* Update for llvm change.Rafael Espindola2014-07-301-1/+1
| | | | llvm-svn: 214356
* MS ABI: Stick internal vftables in a comdat if they have RTTI dataDavid Majnemer2014-07-131-1/+2
| | | | | | | | | | | | | | | Previously, we would have a private backing variable and an internal alias pointing at it. However, -fdata-sections only fires if a global variable has non-private linkage. This means that an unreferenced vftable wouldn't get discarded, bloating the object file. Instead, stick the backing variable in a comdat even if the alias has internal linkage. This will allow the linker to drop the vftable if it is unused. llvm-svn: 212901
* Fix clang tests to be compliant with LLVM IR aliasesDavid Majnemer2014-07-101-2/+2
| | | | | | | | | | Comdat IR references were mistakenly printed for aliases when they passed through the IR/AsmWriter code. This makes clang's tests not check for the existance of these wrongly printed comdat references. llvm-svn: 212733
* CodeGenCXX: Add tests for RTTI in VFTablesDavid Majnemer2014-07-011-0/+41
This test was supposed to go in with r212125. llvm-svn: 212139
OpenPOWER on IntegriCloud