Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
125 commits
Select commit Hold shift + click to select a range
1caa24e
[lldb] Add test for LLDB command autocompletion in REPL
poya Jun 30, 2020
b33e7a8
[lldb] Update call to performIRGeneration
hamishknight Jul 13, 2020
0a989e7
Remove custom Make rule. (NFC)
adrian-prantl Jul 13, 2020
d772905
Implement TypeSystemSwiftTypeRef::IsDefined (NFC)
adrian-prantl Jul 14, 2020
5b66545
Remove bypass of GetAddressOf when dealing with dynamic class types i…
augusto2112 Jul 14, 2020
c32e305
Merge pull request #1449 from adrian-prantl/isdefined
adrian-prantl Jul 14, 2020
3dae326
Merge remote-tracking branch 'github/swift/master' into HEAD
dan-zheng Jul 14, 2020
bece789
Merge pull request #1447 from hamishknight/linked-in
hamishknight Jul 14, 2020
d176960
Merge remote-tracking branch 'github/swift/master' into HEAD
dan-zheng Jul 14, 2020
0d11c10
[AArch64][GlobalISel] Fix TLS accesses clobbering registers incorrectly.
aemerson Jul 14, 2020
3c6e724
Merge pull request #1448 from adrian-prantl/64913338
adrian-prantl Jul 15, 2020
6d5903b
Merge commit 'd4a430971495' from apple/stable/20200108 into swift/rel…
Jul 15, 2020
d4a4309
Merge pull request #1459 from apple/eng/rdar-65438258-2
aemerson Jul 15, 2020
9437a19
Merge commit '6d5903b0453f' from swift/release/5.3 into swift/master
Jul 15, 2020
f4b4df3
Add a decorator to skip tests when running under Rosetta
adrian-prantl Jul 13, 2020
a06b364
Fix the skipIfRosetta decorator
adrian-prantl Jul 15, 2020
52fd0ee
Merge pull request #1421 from poya/port/bug/SR-12867
Teemperor Jul 15, 2020
e3a933a
Merge remote-tracking branch 'github/swift/master' into HEAD
dan-zheng Jul 15, 2020
11a5d99
Merge commit '3c6e724eddf1' from swift/release/5.3 into swift/master
adrian-prantl Jul 15, 2020
4e85e2f
Merge commit '3c6e724eddf1' from swift/release/5.3 into swift/master
Jul 15, 2020
6019688
Merge commit 'd0f8516f800e' from swift/release/5.3 into swift/master
Jul 15, 2020
d0f8516
Merge commit '52dd5edd5424' from apple/stable/20200108 into swift/rel…
Jul 15, 2020
52dd5ed
Merge pull request #1460 from adrian-prantl/decorator
adrian-prantl Jul 15, 2020
393b271
Merge pull request #1455 from augusto2112/remove-dynamic-class-type-c…
adrian-prantl Jul 15, 2020
9fea4c6
Merge remote-tracking branch 'github/swift/master' into HEAD
dan-zheng Jul 15, 2020
92c8cf1
Disable loading scalars as addresses when materializing an entity var…
augusto2112 Jul 14, 2020
5ca75b9
Disable loading scalars as addresses when materializing an entity var…
augusto2112 Jul 14, 2020
71d1820
Merge remote-tracking branch 'github/swift/master' into HEAD
dan-zheng Jul 15, 2020
d1c2161
Merge remote-tracking branch 'github/swift/master' into HEAD
dan-zheng Jul 15, 2020
b82bc8d
Merge pull request #1463 from adrian-prantl/scalar
adrian-prantl Jul 15, 2020
faca260
Merge remote-tracking branch 'github/swift/master' into HEAD
dan-zheng Jul 15, 2020
0ac1698
Merge remote-tracking branch 'github/swift/master' into HEAD
dan-zheng Jul 15, 2020
5873328
Implement TypeSystemSwiftTypeRef::GetTypeInf() (NFC)
adrian-prantl Jul 15, 2020
d709fba
Merge pull request #1466 from adrian-prantl/GetTypeInfo
adrian-prantl Jul 16, 2020
3d3e396
Merge remote-tracking branch 'github/swift/master' into HEAD
dan-zheng Jul 16, 2020
f3ba812
[lldb] Add call to performLLVMOptimizations
hamishknight Jul 16, 2020
d6ba427
lldb: repair the Windows build after #1447
compnerd Jul 16, 2020
f80cf18
Merge pull request #1470 from compnerd/1447
compnerd Jul 16, 2020
864f7de
Merge remote-tracking branch 'github/swift/master' into HEAD
dan-zheng Jul 16, 2020
b5e1ab2
Move SwiftASTContext & TypeSystemSwift* into Plugins/TypeSystem/Swift
adrian-prantl Jul 15, 2020
13a8e5d
Merge pull request #1454 from augusto2112/class-constrained-protocol-…
fredriss Jul 16, 2020
d9b7bf8
Hoist SwiftASTContext::IsFloatingPointType into TypeSystemSwift (NFC)
adrian-prantl Jul 16, 2020
a2e0564
Merge pull request #1468 from adrian-prantl/the-big-rename
adrian-prantl Jul 16, 2020
8b1cc52
Merge remote-tracking branch 'github/swift/master' into HEAD
dan-zheng Jul 16, 2020
5484364
Refactor clang extra args addition
askvortsov-yandex-team Jul 9, 2020
d918e1d
Merge pull request #1469 from hamishknight/a-series-of-tubes
hamishknight Jul 16, 2020
4ea5aea
Merge commit '13a8e5d9406f' from swift/release/5.3 into swift/master
adrian-prantl Jul 16, 2020
215c9c1
Hoist SwiftASTContext::IsIntegerType into TypeSystemSwift (NFC)
adrian-prantl Jul 16, 2020
a59f562
[TF] Fix include for SwiftASTContext.
dan-zheng Jul 16, 2020
a58f88f
Hoist SwiftASTContext::IsScalarType into TypeSystemSwift (NFC)
adrian-prantl Jul 16, 2020
69eb32c
Hoist SwiftASTContext::IsScalarType into TypeSystemSwift (NFC)
adrian-prantl Jul 17, 2020
6df337c
Merge pull request #1444 from DeeSee/refactor_clang_extra_flags
adrian-prantl Jul 17, 2020
5dbe7d8
Merge pull request #1479 from adrian-prantl/int-float
adrian-prantl Jul 17, 2020
6d510c8
Merge pull request #1483 from adrian-prantl/scalar
adrian-prantl Jul 17, 2020
ab3f0a4
[lldb] Fix VALIDATE_AND_RETURN for non-assert build
JDevlieghere Jul 17, 2020
dc8baf1
Merge remote-tracking branch 'github/swift/master' into HEAD
dan-zheng Jul 17, 2020
010ea0d
Merge remote-tracking branch 'github/swift/tensorflow' into HEAD
dan-zheng Jul 17, 2020
42c40c5
Merge pull request #1489 from JDevlieghere/infndefndebug
JDevlieghere Jul 17, 2020
246146a
Merge remote-tracking branch 'github/swift/master' into HEAD
dan-zheng Jul 17, 2020
1999a14
Wrapping reference to SwiftASTContext with #ifndef NDEBUG
Jul 17, 2020
c3b25f8
Fixing spacing
Jul 17, 2020
56c9886
Hoist GetCompleteType from SwiftASTContext into TypeSystemSwift (NFC)
adrian-prantl Jul 17, 2020
be66ee0
Merge pull request #1486 from adrian-prantl/should-treat-scalar
adrian-prantl Jul 17, 2020
7fe2bdb
Merge remote-tracking branch 'github/swift/master' into HEAD
dan-zheng Jul 17, 2020
31a2317
Hoist GetCompleteType from SwiftASTContext into TypeSystemSwift (NFC)
adrian-prantl Jul 17, 2020
e9d37d3
Implement TypeSystemSwiftTypeRef::GetPointerByteSize() (NFC)
adrian-prantl Jul 17, 2020
1a3230c
Fix incorrect assertion condition.
adrian-prantl Jul 17, 2020
96c0a0d
Hoist SwiftASTContext::GetMinimumLanguage() into TypeSystemSwift (NFC)
adrian-prantl Jul 17, 2020
30cc864
Merge pull request #1490 from apple/ematejska-patch-1
adrian-prantl Jul 17, 2020
bd9d95b
Merge pull request #1493 from adrian-prantl/complete
adrian-prantl Jul 17, 2020
e358693
Merge pull request #1496 from adrian-prantl/pointersize
adrian-prantl Jul 17, 2020
63182b1
Sort the cases in GetTypeClass (NFC)
adrian-prantl Jul 17, 2020
293bf8e
Implement TypeSystemSwiftTypeRef::GetTypeClass (NFC)
adrian-prantl Jul 17, 2020
166eefd
Implement TypeSystemSwiftTypeRef::getCanonicalType() (NFC)
adrian-prantl Jul 18, 2020
de9ec57
Merge remote-tracking branch 'github/swift/master' into HEAD
dan-zheng Jul 18, 2020
c28d9fb
[JITLink][MachO] Fix handling of non-extern UNSIGNED pair of SUBTRACT…
lhames Jul 19, 2020
1436b37
Rename SerializedModuleLoader to match Swift compiler's new API.
artemcm Jul 15, 2020
7d14674
Revert "NFC: Refactor clang extra args addition"
adrian-prantl Jul 20, 2020
322f19d
Merge pull request #1500 from adrian-prantl/minimum
adrian-prantl Jul 20, 2020
b05c88f
Merge pull request #1504 from adrian-prantl/gettypeclass
adrian-prantl Jul 20, 2020
918a34e
Add assertion
adrian-prantl Jul 20, 2020
48f93c1
Merge commit '801a49e096a8' from apple/stable/20200108 into swift/rel…
Jul 20, 2020
801a49e
Merge pull request #1513 from lhames/rdar65756694-fix-jitlink-macho-s…
lhames Jul 20, 2020
a9a054f
[Test] TSan tests work on Apple Silicon, skip them based on platform,…
Jul 20, 2020
34fece8
Merge pull request #1507 from adrian-prantl/getcanonical
adrian-prantl Jul 20, 2020
70195f3
Merge pull request #1515 from apple/revert-1444-refactor_clang_extra_…
adrian-prantl Jul 20, 2020
58f35ca
Merge commit '48f93c12452f' from swift/release/5.3 into swift/master
Jul 20, 2020
e966de2
Merge pull request #1516 from dcci/tsan-macos-arm64
dcci Jul 21, 2020
a99ca0e
Merge remote-tracking branch 'github/swift/master' into HEAD
dan-zheng Jul 21, 2020
5e83be5
[lldb] Re-add nullptr check to IRForTarget::RewriteObjCConstString lo…
Teemperor Mar 16, 2020
efa1337
Merge pull request #1519 from Teemperor/cherry/e2d8aa6bf774ef29e134c4…
fredriss Jul 21, 2020
a9abc12
Merge commit 'efa1337f868b' from apple/stable/20200108 into swift/rel…
Jul 24, 2020
8ec2fa5
Merge commit 'a9abc129b66b' from swift/release/5.3 into swift/master
Jul 24, 2020
665d572
[analyzer] scan-build: Fix silencing multiple core checkers.
haoNoQ Jul 18, 2020
6d75449
Avoid failing a CHECK in `DlAddrSymbolizer::SymbolizePC`.
delcypher Jul 21, 2020
ced7c17
Revert "[libcxx] use __builtin_isnan in std::isnan."
hyp Jul 22, 2020
a4f11ae
Merge pull request #1517 from haoNoQ/static-analyzer-cherrypicks-14
haoNoQ Jul 22, 2020
790ad65
Make lit TestRunner.py work in Python 3
hlopko Jul 22, 2020
dbf7d18
Merge pull request #1465 from artemcm/SMLRename
artemcm Jul 22, 2020
c4e8c55
Merge remote-tracking branch 'github/swift/master' into HEAD
dan-zheng Jul 22, 2020
17fc6f6
[NFC] Use std::free instead of ::free
ldionne Jul 20, 2020
f7ef511
[compiler-rt] Use -nostdinc++ in clang_rt.profile to avoid including …
ldionne Jul 20, 2020
b384fbb
Refactor clang extra args addition
askvortsov-yandex-team Jul 9, 2020
97c829a
[Bitcode] Drop invalid branch_weight in BitcodeReader
cachemeifyoucan Jul 23, 2020
5ebdb25
[Bitcode] Avoid duplicating linker option when upgrading
cachemeifyoucan Jul 23, 2020
9fe8b47
[ScheduleDAGRRList] Limit number of candidates to explore.
fhahn Jul 23, 2020
dbcb9ca
[ScheduleDAGRRList] Pacify overload mismatch in std::min.
fhahn Jul 23, 2020
a4a2994
Merge pull request #1531 from DeeSee/refactor_clang_extra_flags
adrian-prantl Jul 24, 2020
2d22ada
Merge remote-tracking branch 'github/swift/master' into HEAD
dan-zheng Jul 24, 2020
99855ff
Merge pull request #1528 from compnerd/lit
compnerd Jul 24, 2020
34f3618
Merge commit '99855ffb1ea9' from apple/stable/20200108 into swift/rel…
Jul 24, 2020
e7185db
Merge commit '34f3618e56d3' from swift/release/5.3 into swift/master
Jul 24, 2020
609ce6f
Merge remote-tracking branch 'github/swift/master' into HEAD
dan-zheng Jul 24, 2020
855b0e9
Merge remote-tracking branch 'github/swift/master' into HEAD
dan-zheng Jul 24, 2020
f41550a
Merge pull request #1523 from hyp/revert-isnan-change
hyp Jul 24, 2020
838ebf8
Merge commit 'f41550a9c0f7' from apple/stable/20200108 into swift/rel…
Jul 25, 2020
f8bd914
Merge commit '838ebf88f604' from swift/release/5.3 into swift/master
Jul 25, 2020
0edbebe
Merge remote-tracking branch 'github/swift/master' into HEAD
dan-zheng Jul 25, 2020
23dbdd0
[lldb/AppleSimulator] Always provide a -simulator environment
fredriss Jul 24, 2020
e32c71a
[lldb/ObjectFileMachO] Correctly account for resolver symbols
fredriss Jul 18, 2020
8ca7624
[lldb/ArchSpec] Always match simulator environment in IsEqualTo
fredriss Jul 28, 2020
ee2e18a
[lldb/Platform] Always prioritize exact triple matches
fredriss Jul 28, 2020
70bf5f4
Merge pull request #1557 from fredriss/dev/cherry-pick-fixes
fredriss Jul 28, 2020
fc42ad3
Merge commit '70bf5f4674af' from swift/release/5.3 into swift/master
Jul 28, 2020
db8896f
Merge remote-tracking branch 'github/swift/master' into HEAD
dan-zheng Jul 28, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions clang/tools/scan-build/bin/scan-build
Original file line number Diff line number Diff line change
Expand Up @@ -1972,11 +1972,13 @@ my $CCC_ANALYZER_ANALYSIS = join ' ', @AnalysesToRun;
my $CCC_ANALYZER_PLUGINS = join ' ', map { "-load ".$_ } @{$Options{PluginsToLoad}};
my $CCC_ANALYZER_CONFIG = join ' ', map { "-analyzer-config ".$_ } @{$Options{ConfigOptions}};

foreach (sort { $Options{SilenceCheckers}{$a} <=> $Options{SilenceCheckers}{$b} }
keys %{$Options{SilenceCheckers}}) {
# Add checkers in order they were silenced.
if (%{$Options{SilenceCheckers}}) {
$CCC_ANALYZER_CONFIG =
$CCC_ANALYZER_CONFIG." -analyzer-config silence-checkers=".$_;
$CCC_ANALYZER_CONFIG." -analyzer-config silence-checkers="
.join(';', sort {
$Options{SilenceCheckers}{$a} <=>
$Options{SilenceCheckers}{$b}
} keys %{$Options{SilenceCheckers}});
}

my %EnvVars = (
Expand Down
3 changes: 3 additions & 0 deletions compiler-rt/cmake/config-ix.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ check_cxx_compiler_flag(/wd4800 COMPILER_RT_HAS_WD4800_FLAG)
# Symbols.
check_symbol_exists(__func__ "" COMPILER_RT_HAS_FUNC_SYMBOL)

# Includes.
check_cxx_compiler_flag(-nostdinc++ COMPILER_RT_HAS_NOSTDINCXX_FLAG)

# Libraries.
check_library_exists(dl dlopen "" COMPILER_RT_HAS_LIBDL)
check_library_exists(rt shm_open "" COMPILER_RT_HAS_LIBRT)
Expand Down
5 changes: 4 additions & 1 deletion compiler-rt/lib/profile/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ if(COMPILER_RT_TARGET_HAS_ATOMICS)
set(EXTRA_FLAGS
${EXTRA_FLAGS}
-DCOMPILER_RT_HAS_ATOMICS=1)
endif()
endif()

if(COMPILER_RT_TARGET_HAS_FCNTL_LCK)
set(EXTRA_FLAGS
Expand All @@ -108,6 +108,9 @@ if(COMPILER_RT_TARGET_HAS_UNAME)
-DCOMPILER_RT_HAS_UNAME=1)
endif()

# We don't use the C++ Standard Library here, so avoid including it by mistake.
append_list_if(COMPILER_RT_HAS_NOSTDINCXX_FLAG -nostdinc++ EXTRA_FLAGS)

# This appears to be a C-only warning banning the use of locals in aggregate
# initializers. All other compilers accept this, though.
# nonstandard extension used : 'identifier' : cannot be initialized using address of automatic variable
Expand Down
19 changes: 13 additions & 6 deletions compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_mac.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,15 @@ bool DlAddrSymbolizer::SymbolizePC(uptr addr, SymbolizedStack *stack) {
int result = dladdr((const void *)addr, &info);
if (!result) return false;

CHECK(addr >= reinterpret_cast<uptr>(info.dli_saddr));
stack->info.function_offset = addr - reinterpret_cast<uptr>(info.dli_saddr);
// Compute offset if possible. `dladdr()` doesn't always ensure that `addr >=
// sym_addr` so only compute the offset when this holds. Failure to find the
// function offset is not treated as a failure because it might still be
// possible to get the symbol name.
uptr sym_addr = reinterpret_cast<uptr>(info.dli_saddr);
if (addr >= sym_addr) {
stack->info.function_offset = addr - sym_addr;
}

const char *demangled = DemangleSwiftAndCXX(info.dli_sname);
if (!demangled) return false;
stack->info.function = internal_strdup(demangled);
Expand Down Expand Up @@ -219,10 +226,10 @@ bool AtosSymbolizer::SymbolizePC(uptr addr, SymbolizedStack *stack) {
start_address = reinterpret_cast<uptr>(info.dli_saddr);
}

// Only assig to `function_offset` if we were able to get the function's
// start address.
if (start_address != AddressInfo::kUnknown) {
CHECK(addr >= start_address);
// Only assign to `function_offset` if we were able to get the function's
// start address and we got a sensible `start_address` (dladdr doesn't always
// ensure that `addr >= sym_addr`).
if (start_address != AddressInfo::kUnknown && addr >= start_address) {
stack->info.function_offset = addr - start_address;
}
return true;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// FIXME(dliew): Duplicated from `test/sanitizer_common/TestCases/Darwin/symbolizer-function-offset-dladdr.cpp`.
// This case can be dropped once sanitizer_common tests work on iOS devices (rdar://problem/47333049).

// NOTE: `detect_leaks=0` is necessary because with LSan enabled the dladdr
// symbolizer actually leaks memory because the call to
// `__sanitizer::DemangleCXXABI` leaks memory which LSan detects
// (rdar://problem/42868950).

// RUN: %clangxx_asan %s -O0 -o %t
// RUN: %env_asan_opts=detect_leaks=0,verbosity=2,external_symbolizer_path=,stack_trace_format='"function_name_%f___function_offset_%q"' %run %t > %t.output 2>&1
// RUN: FileCheck -input-file=%t.output %s
#include <sanitizer/common_interface_defs.h>
#include <stdio.h>

void baz() {
printf("Do stuff in baz\n");
__sanitizer_print_stack_trace();
}

void bar() {
printf("Do stuff in bar\n");
baz();
}

void foo() {
printf("Do stuff in foo\n");
bar();
}

int main() {
printf("Do stuff in main\n");
foo();
return 0;
}

// CHECK: External symbolizer is explicitly disabled
// CHECK: Using dladdr symbolizer

// These `function_offset` patterns are designed to disallow `0x0` which is the
// value printed for `kUnknown`.
// CHECK: function_name_baz{{(\(\))?}}___function_offset_0x{{0*[1-9a-f][0-9a-f]*$}}
// CHECK: function_name_bar{{(\(\))?}}___function_offset_0x{{0*[1-9a-f][0-9a-f]*$}}
// CHECK: function_name_foo{{(\(\))?}}___function_offset_0x{{0*[1-9a-f][0-9a-f]*$}}
// CHECK: function_name_main{{(\(\))?}}___function_offset_0x{{0*[1-9a-f][0-9a-f]*$}}
4 changes: 0 additions & 4 deletions libcxx/include/math.h
Original file line number Diff line number Diff line change
Expand Up @@ -510,11 +510,7 @@ _LIBCPP_INLINE_VISIBILITY
bool
__libcpp_isnan(_A1 __lcpp_x) _NOEXCEPT
{
#if __has_builtin(__builtin_isnan)
return __builtin_isnan(__lcpp_x);
#else
return isnan(__lcpp_x);
#endif
}

#undef isnan
Expand Down
2 changes: 1 addition & 1 deletion lldb/include/lldb/Core/SwiftForward.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class NominalType;
class NominalTypeDecl;
class ProtocolDecl;
class SearchPathOptions;
class SerializedModuleLoader;
class ImplicitSerializedModuleLoader;
class ParseableInterfaceModuleLoader;
class SILModule;
class SILOptions;
Expand Down
1 change: 1 addition & 0 deletions lldb/include/lldb/Symbol/LineTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#ifndef liblldb_LineTable_h_
#define liblldb_LineTable_h_

#include "lldb/Core/Address.h"
#include "lldb/Core/ModuleChild.h"
#include "lldb/Core/Section.h"
#include "lldb/Symbol/LineEntry.h"
Expand Down
13 changes: 5 additions & 8 deletions lldb/include/lldb/Target/SwiftLanguageRuntime.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,21 @@
#ifndef liblldb_SwiftLanguageRuntime_h_
#define liblldb_SwiftLanguageRuntime_h_

// C Includes
// C++ Includes
#include <mutex>
#include <tuple>
#include <vector>
// Other libraries and framework includes
// Project includes
#include "Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h"
#include "Plugins/TypeSystem/Swift/SwiftASTContext.h"
#include "lldb/Breakpoint/BreakpointPrecondition.h"
#include "lldb/Core/PluginInterface.h"
#include "lldb/Symbol/SwiftASTContext.h"
#include "lldb/Target/LanguageRuntime.h"
#include "lldb/lldb-private.h"

#include "llvm/ADT/Optional.h"
#include "llvm/ADT/StringSet.h"
#include "llvm/Support/Casting.h"

#include <mutex>
#include <tuple>
#include <vector>

namespace swift {
namespace remote {
class MemoryReader;
Expand Down
10 changes: 10 additions & 0 deletions lldb/packages/Python/lldbsuite/test/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,16 @@ def are_sb_headers_missing():
return skipTestIfFn(are_sb_headers_missing)(func)


def skipIfRosetta(bugnumber):
"""Skip a test when running the testsuite on macOS under the Rosetta translation layer."""
def is_running_rosetta(self):
if not lldbplatformutil.getPlatform() in ['darwin', 'macosx']:
return "not on macOS"
if (platform.uname()[5] == "arm") and (self.getArchitecture() == "x86_64"):
return "skipped under Rosetta"
return None
return skipTestIfFn(is_running_rosetta)

def skipIfiOSSimulator(func):
"""Decorate the item to skip tests that should be skipped on the iOS Simulator."""
def is_ios_simulator():
Expand Down
2 changes: 1 addition & 1 deletion lldb/source/API/SystemInitializerFull.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
#include "Plugins/ExpressionParser/Swift/SwiftREPL.h"
#include "Plugins/InstrumentationRuntime/SwiftRuntimeReporting/SwiftRuntimeReporting.h"
#include "Plugins/Language/Swift/SwiftLanguage.h"
#include "lldb/Symbol/SwiftASTContext.h"
#include "Plugins/TypeSystem/Swift/SwiftASTContext.h"
#include "lldb/Target/SwiftLanguageRuntime.h"
// END SWIFT

Expand Down
2 changes: 1 addition & 1 deletion lldb/source/Core/Module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
#include "Plugins/Language/ObjC/ObjCLanguage.h"

// BEGIN SWIFT
#include "lldb/Symbol/SwiftASTContext.h"
#include "Plugins/TypeSystem/Swift/SwiftASTContext.h"
#include "lldb/Target/SwiftLanguageRuntime.h"
// END SWIFT

Expand Down
2 changes: 1 addition & 1 deletion lldb/source/Core/ValueObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
#include "Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.h"

// BEGIN SWIFT
#include "lldb/Symbol/SwiftASTContext.h"
#include "Plugins/TypeSystem/Swift/SwiftASTContext.h"
// END SWIFT

#include "llvm/Support/Compiler.h"
Expand Down
3 changes: 2 additions & 1 deletion lldb/source/Core/ValueObjectDynamicValue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include "lldb/Core/Value.h"
#include "lldb/Core/ValueObject.h"
#include "lldb/Symbol/CompilerType.h"
#include "lldb/Symbol/SwiftASTContext.h"
#include "lldb/Symbol/Type.h"
#include "lldb/Target/ExecutionContext.h"
#include "lldb/Target/LanguageRuntime.h"
Expand All @@ -23,6 +22,8 @@
#include "lldb/Utility/Status.h"
#include "lldb/lldb-types.h"

#include "Plugins/TypeSystem/Swift/SwiftASTContext.h"

#include <string.h>
namespace lldb_private {
class Declaration;
Expand Down
3 changes: 2 additions & 1 deletion lldb/source/Core/ValueObjectVariable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include "lldb/Symbol/Declaration.h"
#include "lldb/Symbol/Function.h"
#include "lldb/Symbol/ObjectFile.h"
#include "lldb/Symbol/SwiftASTContext.h"
#include "lldb/Symbol/SymbolContext.h"
#include "lldb/Symbol/SymbolContextScope.h"
#include "lldb/Symbol/Type.h"
Expand All @@ -33,6 +32,8 @@
#include "lldb/lldb-private-enumerations.h"
#include "lldb/lldb-types.h"

#include "Plugins/TypeSystem/Swift/TypeSystemSwift.h"

#include "llvm/ADT/StringRef.h"

#include <assert.h>
Expand Down
17 changes: 4 additions & 13 deletions lldb/source/Expression/Materializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "lldb/Core/ValueObjectVariable.h"
#include "lldb/Expression/ExpressionVariable.h"
#include "lldb/Symbol/Symbol.h"
#include "lldb/Symbol/SwiftASTContext.h"
#include "lldb/Symbol/Type.h"
#include "lldb/Symbol/Variable.h"
#include "lldb/Target/ExecutionContext.h"
Expand All @@ -24,6 +23,8 @@
#include "lldb/Utility/Log.h"
#include "lldb/Utility/RegisterValue.h"

#include "Plugins/TypeSystem/Swift/SwiftASTContext.h"

#include <memory>

using namespace lldb_private;
Expand Down Expand Up @@ -489,19 +490,9 @@ class EntityVariable : public Materializer::Entity {
}
} else {
AddressType address_type = eAddressTypeInvalid;
const bool is_dynamic_class_type =
m_is_generic &&
(valobj_type.GetTypeClass() == lldb::eTypeClassClass);
const bool scalar_is_load_address = m_is_generic; // this is the only
// time we're dealing
// with dynamic values

// if the dynamic type is a class, bypass the GetAddressOf() optimization
// as it doesn't do the right thing
const bool scalar_is_load_address = false;
lldb::addr_t addr_of_valobj =
is_dynamic_class_type
? LLDB_INVALID_ADDRESS
: valobj_sp->GetAddressOf(scalar_is_load_address, &address_type);
valobj_sp->GetAddressOf(scalar_is_load_address, &address_type);

// BEGIN Swift.
if (lldb::ProcessSP process_sp =
Expand Down
3 changes: 2 additions & 1 deletion lldb/source/Expression/UserExpression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#include "lldb/Symbol/Block.h"
#include "lldb/Symbol/Function.h"
#include "lldb/Symbol/ObjectFile.h"
#include "lldb/Symbol/SwiftASTContext.h"
#include "lldb/Symbol/SymbolVendor.h"
#include "lldb/Symbol/Type.h"
#include "lldb/Symbol/TypeSystem.h"
Expand All @@ -45,6 +44,8 @@
#include "lldb/Utility/Log.h"
#include "lldb/Utility/StreamString.h"

#include "Plugins/TypeSystem/Swift/SwiftASTContext.h"

using namespace lldb_private;

char UserExpression::ID;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "lldb/Utility/Log.h"
#include "lldb/Utility/StreamString.h"

#include "lldb/Symbol/SwiftASTContext.h" // Needed for llvm::isa<SwiftASTContext>(...)
#include "Plugins/TypeSystem/Swift/SwiftASTContext.h" // Needed for llvm::isa<SwiftASTContext>(...)
#include "lldb/Symbol/TypeSystem.h"

#include "swift/AST/Decl.h"
Expand Down
2 changes: 1 addition & 1 deletion lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ bool IRForTarget::RewriteObjCConstString(llvm::GlobalVariable *ns_str,
m_execution_unit.FindSymbol(g_CFStringCreateWithBytes_str,
missing_weak);
if (CFStringCreateWithBytes_addr == LLDB_INVALID_ADDRESS || missing_weak) {
log->PutCString("Couldn't find CFStringCreateWithBytes in the target");
LLDB_LOG(log, "Couldn't find CFStringCreateWithBytes in the target");

m_error_stream.Printf("Error [IRForTarget]: Rewriting an Objective-C "
"constant string requires "
Expand Down
1 change: 1 addition & 0 deletions lldb/source/Plugins/ExpressionParser/Swift/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ add_lldb_library(lldbPluginExpressionParserSwift PLUGIN
lldbSymbol
lldbTarget
lldbUtility
lldbPluginTypeSystemSwift
swiftAST
swiftBasic
swiftClangImporter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@

#include "SwiftASTManipulator.h"

#include "Plugins/TypeSystem/Swift/SwiftASTContext.h"
#include "lldb/Expression/ExpressionParser.h"
#include "lldb/Expression/ExpressionSourceCode.h"
#include "lldb/Symbol/SwiftASTContext.h"
#include "lldb/Target/Target.h"
#include "lldb/Utility/ConstString.h"
#include "lldb/Utility/Log.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1700,12 +1700,18 @@ unsigned SwiftExpressionParser::Parse(DiagnosticManager &diagnostic_manager,
std::lock_guard<std::recursive_mutex> global_context_locker(
IRExecutionUnit::GetLLVMGlobalContextMutex());

const auto &IRGenOpts = swift_ast_ctx->GetIRGenOptions();

auto GenModule = swift::performIRGeneration(
swift_ast_ctx->GetIRGenOptions(), &parsed_expr->module,
&parsed_expr->module, IRGenOpts, swift_ast_ctx->GetTBDGenOptions(),
std::move(sil_module), "lldb_module",
swift::PrimarySpecificPaths("", parsed_expr->main_filename),
llvm::ArrayRef<std::string>());


if (GenModule) {
swift::performLLVMOptimizations(IRGenOpts, GenModule.getModule(),
GenModule.getTargetMachine());
}
auto ContextAndModule = std::move(GenModule).release();
m_llvm_context.reset(ContextAndModule.first);
m_module.reset(ContextAndModule.second);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "SwiftExpressionSourceCode.h"

#include "Plugins/ExpressionParser/Swift/SwiftASTManipulator.h"
#include "lldb/Symbol/SwiftASTContext.h"
#include "Plugins/TypeSystem/Swift/SwiftASTContext.h"
#include "lldb/Target/Language.h"
#include "lldb/Target/Platform.h"
#include "lldb/Target/Target.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,10 @@

#include "SwiftPersistentExpressionState.h"
#include "SwiftExpressionVariable.h"
#include "lldb/Expression/IRExecutionUnit.h"

#include "lldb/Core/Value.h"

#include "lldb/Symbol/SwiftASTContext.h" // Needed for llvm::isa<SwiftASTContext>(...)
#include "lldb/Expression/IRExecutionUnit.h"
#include "lldb/Symbol/TypeSystem.h"

#include "lldb/Utility/DataExtractor.h"
#include "lldb/Utility/Log.h"
#include "lldb/Utility/StreamString.h"
Expand Down
Loading