summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/pragma-init_seg.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merging r340079:Reid Kleckner2018-08-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r340079 | rnk | 2018-08-17 13:59:27 -0700 (Fri, 17 Aug 2018) | 20 lines [MS] Mangle a hash of the main file path into anonymous namespaces 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 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_70@340087 91177308-0d34-0410-b5e6-96231b3b80d8
* [MS] Don't escape MS C++ names with \01Reid Kleckner2018-03-161-16/+16
| | | | | | | It is not needed after LLVM r327734. Now it will be easier to copy-paste IR symbol names from Clang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@327738 91177308-0d34-0410-b5e6-96231b3b80d8
* Bring r325915 back.Rafael Espindola2018-02-231-6/+6
| | | | | | | | | | | | | | | The tests that failed on a windows host have been fixed. Original message: Start setting dso_local for COFF. With this there are still some GVs where we don't set dso_local because setGVProperties is never called. I intend to fix that in followup commits. This is just the bare minimum to teach shouldAssumeDSOLocal what it should do for COFF. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@325940 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Start setting dso_local for COFF."Rafael Espindola2018-02-231-6/+6
| | | | | | | | This reverts commit r325915. It will take some time to fix the failures on a windows host. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@325929 91177308-0d34-0410-b5e6-96231b3b80d8
* Start setting dso_local for COFF.Rafael Espindola2018-02-231-6/+6
| | | | | | | | | With this there are still some GVs where we don't set dso_local because setGVProperties is never called. I intend to fix that in followup commits. This is just the bare minimum to teach shouldAssumeDSOLocal what it should do for COFF. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@325915 91177308-0d34-0410-b5e6-96231b3b80d8
* Changed renaming of local symbols by inserting a dot vefore the numeric suffixSunil Srivastava2015-05-121-10/+10
| | | | | | | | details in http://reviews.llvm.org/D9483 goes with llvm checkin r237150 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@237151 91177308-0d34-0410-b5e6-96231b3b80d8
* Update for .ll syntax change.Rafael Espindola2015-01-061-6/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@225303 91177308-0d34-0410-b5e6-96231b3b80d8
* -fms-extensions: Implement half of #pragma init_segReid Kleckner2014-07-221-16/+72
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This pragma is very rare. We could *hypothetically* lower some uses of it down to @llvm.global_ctors, but given that GlobalOpt isn't able to optimize prioritized global ctors today, there's really no point. If we wanted to do this in the future, I would check if the section used in the pragma started with ".CRT$XC" and had up to two characters after it. Those two characters could form the 16-bit initialization priority that we support in @llvm.global_ctors. We would have to teach LLVM to lower prioritized global ctors on COFF as well. This should let us compile some silly uses of this pragma in WebKit / Blink. Reviewers: rsmith, majnemer Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4549 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213593 91177308-0d34-0410-b5e6-96231b3b80d8
* -fms-extensions: Error out on #pragma init_segReid Kleckner2014-04-031-0/+16
By ignoring this pragma with a warning, we're essentially miscompiling the user's program. WebKit / Blink use this pragma to disable dynamic initialization and finalization of some static data, and running the dtors crashes the program. Error out for now, so that /fallback compiles the TU correctly with MSVC. This pragma should be implemented some time this month, and we can remove this hack. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205554 91177308-0d34-0410-b5e6-96231b3b80d8