Commit Graph

1132 Commits

Author SHA1 Message Date
Ben Barham
2523660d3b Revert "[DebugInfo] Stop emitting spare bits mask in debug info" 2024-10-21 14:23:04 -07:00
Augusto Noronha
7443fc1c6f [DebugInfo] Stop emitting spare bits mask in debug info
We're now able to calculate the spare bits mask from other information.
Stop emitting it in debug info.
2024-10-15 16:18:43 -07:00
swift-ci
e5f97d79c5 Merge remote-tracking branch 'origin/main' into rebranch 2024-09-30 07:15:01 -07:00
nate-chandler
ba8f8ea282 Merge pull request #76526 from nate-chandler/general-coro/20240906/1
[CoroutineAccessors] Initial framing.
2024-09-30 07:04:04 -07:00
swift-ci
54d8c9feb0 Merge remote-tracking branch 'origin/main' into rebranch 2024-09-29 14:55:02 -07:00
Hamish Knight
91ae5d6345 [AST] NFC: Rename getArgumentInterfaceType -> getPayloadInterfaceType
IMO this is a slightly clearer name, many of its
uses already use the term "payload".
2024-09-29 17:05:14 +01:00
Nate Chandler
091368ba21 [CoroutineAccessors] Added read.
The name is a placeholder for the mutating single-yield coroutine
accessor.
2024-09-26 18:10:39 -07:00
Nate Chandler
98a2e6a7df [CoroutineAccessors] Added modify.
The name is a placeholder for the mutating single-yield coroutine
accessor.
2024-09-26 18:10:39 -07:00
swift-ci
da55e84c74 Merge remote-tracking branch 'origin/main' into rebranch 2024-09-05 15:35:33 -07:00
Alejandro Alonso
75c2cbf593 Implement value generics
Some requirement machine work

Rename requirement to Value

Rename more things to Value

Fix integer checking for requirement

some docs and parser changes

Minor fixes
2024-09-04 15:13:25 -07:00
swift-ci
e27edcada1 Merge remote-tracking branch 'origin/main' into rebranch 2024-08-21 16:49:14 -07:00
Slava Pestov
863afad0a2 Merge pull request #75947 from slavapestov/type-subst-rework-2
Type::subst() rework, part 2
2024-08-21 19:31:08 -04:00
Slava Pestov
bbea8ec1a2 AST: Use TypeTransform::transformSubMap() to transform SILBoxType 2024-08-21 13:21:48 -04:00
swift-ci
9db9710585 Merge remote-tracking branch 'origin/main' into rebranch 2024-08-21 09:56:52 -07:00
Augusto Noronha
1b2c13b12e Merge pull request #75920 from ellishg/debug-info-verify
[IRGen][DebugInfo] Emit declarations for CFunctionPointer reps
2024-08-21 09:43:08 -07:00
swift-ci
a5ec343a08 Merge remote-tracking branch 'origin/main' into rebranch 2024-08-17 06:14:34 -07:00
Ellis Hoag
7c19ca2fbc [IRGen][DebugInfo] Emit declarations for CFunctionPointer reps 2024-08-15 16:35:18 -07:00
Slava Pestov
b601c294ac AST: Replace remaining uses of Type::transform() with transformRec() 2024-08-12 16:05:43 -04:00
swift-ci
b7921a8232 Merge remote-tracking branch 'origin/main' into rebranch 2024-07-06 14:34:09 -07:00
Slava Pestov
fae01d9776 AST: Remove ModuleDecl parameter from more places 2024-07-06 12:05:46 -04:00
swift-ci
847f915d2e Merge remote-tracking branch 'origin/main' into rebranch 2024-06-22 07:14:46 -07:00
Adrian Prantl
c9f5af5617 Fix a regression that caused the compiler to drop the path names of generated
macro expansion source code when emitting DWARF 4 or earlier.

rdar://126688061
2024-06-21 18:58:11 -07:00
Xi Ge
736ccef626 Merge remote-tracking branch 'apple/main' into rebranch 2024-06-20 15:16:55 -07:00
Tim Kientzle
1d961ba22d Add #include "swift/Basic/Assertions.h" to a lot of source files
Although I don't plan to bring over new assertions wholesale
into the current qualification branch, it's entirely possible
that various minor changes in main will use the new assertions;
having this basic support in the release branch will simplify that.
(This is why I'm adding the includes as a separate pass from
rewriting the individual assertions)
2024-06-05 19:37:30 -07:00
Hamish Knight
782ae72efd Merge branch 'main' into merge-rebranch 2024-05-23 20:03:52 +01:00
Emil Pedersen
5606fbc1d6 [IRGenDebugInfo] Disable usage of dbg.declare in optimized code
Except for the async context, where it is needed (arguments
within an async function).

We don't support dbg.declare in optimized code, as variables can
be moved by SIL optimization passes. If a partial store is
eliminated, we want a dbg.value on the allocation, and another
dbg.value with a fragment in place of the partial store.

rdar://128155050
2024-05-22 09:35:37 -07:00
Emil Pedersen
2726d8318c [IRGenDebugInfo] Allow multiple dbg.declare on an alloca
This is unnecessarily dropping debug info, as there is currently
no assertion in LLVM. The sharing of stack slot can happen
because of AllocStackHoisting, which is run at -Onone too.
2024-05-20 16:55:22 -07:00
swift-ci
cdc5aae3ab Merge remote-tracking branch 'origin/main' into rebranch 2024-05-03 13:15:56 -07:00
Augusto Noronha
ef5aae1fea Merge pull request #72445 from augusto2112/zero-unsub-types-main
[DebugInfo] Always emit unsubsituted generic types with size 0
2024-05-03 13:13:59 -07:00
swift-ci
a51df69c93 Merge remote-tracking branch 'origin/main' into rebranch 2024-04-29 10:34:28 -07:00
Emil Pedersen
84dae7c37a [DebugInfo] Add support for constant debug values 2024-04-26 16:31:16 -07:00
Emil Pedersen
8ad3066011 [DebugInfo] Fix implicit deref on arithmetic expressions 2024-04-26 16:31:16 -07:00
swift-ci
3ea8b187bb Merge remote-tracking branch 'origin/main' into rebranch 2024-04-25 16:54:34 -07:00
Emil Pedersen
584d1db307 [IRGen] [DebugInfo] Ignore autogenerated flag for variables 2024-04-24 18:25:43 -07:00
Nate Chandler
c43f87101f Merge branch 'main' into rebranch
Conflicts:
      lib/Basic/Platform.cpp

```
diff --git a/lib/Basic/Platform.cpp b/lib/Basic/Platform.cpp
index 240edfa144a..1797c87635f 100644
--- a/lib/Basic/Platform.cpp
+++ b/lib/Basic/Platform.cpp
@@ -200,10 +200,7 @@ StringRef swift::getPlatformNameForTriple(const llvm::Triple &triple) {
   case llvm::Triple::CUDA:
   case llvm::Triple::DragonFly:
   case llvm::Triple::DriverKit:
-<<<<<<< HEAD
   case llvm::Triple::ELFIAMCU:
-=======
->>>>>>> main
   case llvm::Triple::Emscripten:
   case llvm::Triple::Fuchsia:
   case llvm::Triple::HermitCore:
```
2024-04-17 13:32:48 -07:00
Augusto Noronha
bc4eeb861c Merge pull request #72963 from augusto2112/declaration-by-rep
[DebugInfo] Emit declaration by checking both type and SIL func repr
2024-04-17 10:19:20 -07:00
Emil Pedersen
3136d2eac4 [DebugInfo] [IRGen] Use instruction column number for variables
The source location for the variable should be the value in VarInfo if set,
otherwise it should use the location of the instruction. Both ways should
be consistent, and as we use column number if VarInfo is set, we have to do
it if isnt, too.
2024-04-16 10:28:02 -07:00
Augusto Noronha
e0e7a08a31 [DebugInfo] Emit declaration by checking both type and SIL func repr 2024-04-10 16:13:57 -07:00
Ben Barham
8bf89a421e [IRGen] Rename FindDbgDeclareUses to findDbgDeclares
Renamed in LLVM 2d9d9a1a556a5f8845a7a9e19dc52346b825989e.
2024-04-08 08:58:59 -07:00
Ben Barham
5193b4f915 [IRGen] Update DbgIntrinsicEmitter::insert functions to DbgInstPtr
The various `DIBuilder` inserts now return a `DbgInsertPtr`, update
`DbgIntrinsicEmitter` to as well.
2024-04-08 08:58:59 -07:00
Adrian Prantl
1deaf0b538 Merge pull request #72466 from adrian-prantl/cleanup-replaceable
Cleanup uses of replaceable metadata types (NFC)
2024-04-05 13:38:51 -07:00
Adrian Prantl
1b5d61b8fa Merge pull request #72467 from adrian-prantl/123923517
Work around a memory leak caught by the LSAN bot.
2024-04-03 13:49:05 -07:00
Ben Barham
1fdda023b3 Rename StringRef::endswith references to StringRef::ends_with
Missed this when doing the `startswith` renaming. `endswith` has also
been deprecated upstream (and presumably soon to be removed).
2024-04-01 10:59:16 -07:00
Alex Lorenz
8484c61f19 [debuginfo][codeview] avoid using line zero artificial location for traps when emitting codeview
This fixes an issue where the debug locations for Swift traps were dropped in the produced PDB files, as they were pointing to line 0

I validated this on a sample project using WinDbgx, which can now correctly trap on the same line in multiple places
2024-03-25 13:35:24 -07:00
Konrad `ktoso` Malawski
6132386371 [Distributed] Complete handling of protocol calls and witnesses using adjusted mangling scheme (#72416) 2024-03-23 23:54:23 +09:00
Adrian Prantl
0742c01806 Work around a memory leak caught by the LSAN bot.
Fundamentally the problem here is that SILPassManager is creating an IRGenModule
without calling finalize() on it under some circumstances. It would be better to
fix that instead.

rdar://123923517
2024-03-20 13:02:46 -07:00
Adrian Prantl
2ee8156d75 Cleanup uses of replaceable metadata types (NFC) 2024-03-20 13:00:43 -07:00
Augusto Noronha
128d452371 [DebugInfo] Always emit unsubsituted generic types with size 0
Unsubstituted generic types shouldn't have a size, precisely because
the generic parameters aren't substituted in. Always emit them with a
size 0.
2024-03-19 16:32:12 -07:00
Augusto Noronha
0e2c41cb8b Merge pull request #72338 from augusto2112/deb-specialized-types
[DebugInfo] Generate debug info for specialized types
2024-03-19 10:43:10 -07:00
Augusto Noronha
ae5e341db4 [DebugInfo] Generate debug info for specialized types
Specialized types are generic types, or types whose parent is
specialized.

IRGenDebugInfo was previously mistankenly emitting debug info for
nominal specialized types as if they regular nominal types, which caused
problems as that code path does not handle references to generic
parameters.
2024-03-18 15:43:38 -07:00