summaryrefslogtreecommitdiff
path: root/clang/test/CodeGenCXX/sections.cpp
AgeCommit message (Collapse)Author
2025-04-15[clang] consistently quote expressions in diagnostics (#134769)Matheus Izvekov
2023-08-14Make globals with mutable members non-constant, even in custom sectionsDavid Blaikie
Turned out we were making overly simple assumptions about which sections (& section flags) would be used when emitting a global into a custom section. This lead to sections with read-only flags being used for globals of struct types with mutable members. Fixed by porting the codegen function with the more nuanced handling/checking for mutable members out of codegen for use in the sema code that does this initial checking/mapping to section flags. Differential Revision: https://reviews.llvm.org/D156726
2022-10-06[CodeGenCXX] Convert some tests to opaque pointers (NFC)Nikita Popov
Conversion done using the script at https://gist.github.com/nikic/98357b71fd67756b0f064c9517b62a34. These are tests where the conversion worked out of the box and no manual fixup was performed.
2022-04-07[OpaquePtrs][Clang] Add -no-opaque-pointers to tests (NFC)Nikita Popov
This adds -no-opaque-pointers to clang tests whose output will change when opaque pointers are enabled by default. This is intended to be part of the migration approach described in https://discourse.llvm.org/t/enabling-opaque-pointers-by-default/61322/9. The patch has been produced by replacing %clang_cc1 with %clang_cc1 -no-opaque-pointers for tests that fail with opaque pointers enabled. Worth noting that this doesn't cover all tests, there's a remaining ~40 tests not using %clang_cc1 that will need a followup change. Differential Revision: https://reviews.llvm.org/D123115
2018-02-23Bring r325915 back.Rafael Espindola
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. llvm-svn: 325940
2018-02-23Revert "Start setting dso_local for COFF."Rafael Espindola
This reverts commit r325915. It will take some time to fix the failures on a windows host. llvm-svn: 325929
2018-02-23Start setting dso_local for COFF.Rafael Espindola
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. llvm-svn: 325915
2016-04-29Recommit "[MS] Improved implementation of stack pragmas (vtordisp, *_seg)"Denis Zobnin
Slightly updated version, double-checked build and tests. Improve implementation of MS pragmas that use stack + compatibility fixes. This patch: 1. Changes implementation of #pragma vtordisp to use PragmaStack class that other stack pragmas use; 2. Fixes "#pragma vtordisp()" behavior - it shouldn't affect the stack; 3. Supports "save-restore" of pragma stacks on enter / exit a C++ method body, as MSVC does. TODO: 1. Change implementation of #pragma pack to use the same approach; 2. Introduce diagnostics on popping named stack slots, as MSVC does. Reviewers: rnk, thakis Differential revision: http://reviews.llvm.org/D19361 llvm-svn: 268029
2016-04-28Revert "[MS] Improved implementation of MS stack pragmas (vtordisp, *_seg)"Denis Zobnin
This reverts commit r267866. llvm-svn: 267870
2016-04-28[MS] Improved implementation of MS stack pragmas (vtordisp, *_seg)Denis Zobnin
Rework implementation of several MS pragmas that use internal stack: vtordisp, {bss|code|const|data}_seg. This patch: 1. Makes #pragma vtordisp use PragmaStack class as *_seg pragmas do; 2. Fixes "#pragma vtordisp()" behavior: it shouldn't affect stack; 3. Saves/restores the stacks on enter/exit a C++ method body. llvm-svn: 267866
2015-03-13Test case updates for explicit type parameter to the gep operatorDavid Blaikie
llvm-svn: 232187
2014-10-22Parse: Ignore "long" and "short" in #pragma sectionDavid Majnemer
This fixes PR21337. llvm-svn: 220429
2014-10-17Move test/CodeGen/sections.c to CodeGenCXX/sections.cppHans Wennborg
The test was running with -xc++. Seems it wants to be a C++ file. llvm-svn: 220069