Skip to content

Commit cd4d1a9

Browse files
committed
Merge commit '5565d365f2a' into sycl-web
2 parents 438bedc + 5565d36 commit cd4d1a9

File tree

516 files changed

+2185
-1388
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

516 files changed

+2185
-1388
lines changed

clang/test/CodeGen/bpf-attr-preserve-access-index-4.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ int test(__s3 *arg) {
2727

2828
// CHECK: define dso_local i32 @test
2929
// CHECK-NOT: call %struct.s2* @llvm.preserve.struct.access.index.p0s_struct.s2s.p0s_struct.s3s
30-
// CHECK: call %union.anon* @llvm.preserve.struct.access.index.p0s_union.anons.p0s_struct.s2s(%struct.s2* %a, i32 0, i32 0)
31-
// CHECK: call %union.anon* @llvm.preserve.union.access.index.p0s_union.anons.p0s_union.anons(%union.anon* %1, i32 0)
32-
// CHECK: call %struct.s1* @llvm.preserve.array.access.index.p0s_struct.s1s.p0a3s_struct.s1s([3 x %struct.s1]* %b, i32 1, i32 2)
30+
// CHECK: call %union.anon* @llvm.preserve.struct.access.index.p0s_union.anons.p0s_struct.s2s(%struct.s2* %{{[0-9a-z]+}}, i32 0, i32 0)
31+
// CHECK: call %union.anon* @llvm.preserve.union.access.index.p0s_union.anons.p0s_union.anons(%union.anon* %{{[0-9a-z]+}}, i32 0)
32+
// CHECK: call %struct.s1* @llvm.preserve.array.access.index.p0s_struct.s1s.p0a3s_struct.s1s([3 x %struct.s1]* %{{[0-9a-z]+}}, i32 1, i32 2)
3333
// CHECK-NOT: call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.s1s

clang/test/CodeGen/ms-inline-asm.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,13 +592,21 @@ void t41(unsigned short a) {
592592
}
593593

594594
void t42() {
595-
// CHECK-LABEL: define void @t42
595+
// CHECK-LABEL: define void @t42(
596596
int flags;
597597
__asm mov flags, eax
598598
// CHECK: mov $0, eax
599599
// CHECK: "=*m,~{dirflag},~{fpsr},~{flags}"(i32* %flags)
600600
}
601601

602+
void t42b() {
603+
// CHECK-LABEL: define void @t42b(
604+
int mxcsr;
605+
__asm mov mxcsr, eax
606+
// CHECK: mov $0, eax
607+
// CHECK: "=*m,~{dirflag},~{fpsr},~{flags}"(i32* %mxcsr)
608+
}
609+
602610
void t43() {
603611
// CHECK-LABEL: define void @t43
604612
C strct;

clang/test/Misc/pragma-attribute-supported-attributes-list.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
// CHECK-NEXT: ArmMveAlias (SubjectMatchRule_function)
2121
// CHECK-NEXT: AssumeAligned (SubjectMatchRule_objc_method, SubjectMatchRule_function)
2222
// CHECK-NEXT: Availability ((SubjectMatchRule_record, SubjectMatchRule_enum, SubjectMatchRule_enum_constant, SubjectMatchRule_field, SubjectMatchRule_function, SubjectMatchRule_namespace, SubjectMatchRule_objc_category, SubjectMatchRule_objc_implementation, SubjectMatchRule_objc_interface, SubjectMatchRule_objc_method, SubjectMatchRule_objc_property, SubjectMatchRule_objc_protocol, SubjectMatchRule_record, SubjectMatchRule_type_alias, SubjectMatchRule_variable))
23+
// CHECK-NEXT: BPFPreserveAccessIndex (SubjectMatchRule_record)
2324
// CHECK-NEXT: CFAuditedTransfer (SubjectMatchRule_function)
2425
// CHECK-NEXT: CFConsumed (SubjectMatchRule_variable_is_parameter)
2526
// CHECK-NEXT: CFICanonicalJumpTable (SubjectMatchRule_function)

clang/tools/clang-format/ClangFormat.cpp

Lines changed: 9 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -292,56 +292,25 @@ static void outputReplacementsXML(const Replacements &Replaces) {
292292
static bool
293293
emitReplacementWarnings(const Replacements &Replaces, StringRef AssumedFileName,
294294
const std::unique_ptr<llvm::MemoryBuffer> &Code) {
295-
if (Replaces.empty()) {
295+
if (Replaces.empty())
296296
return false;
297-
}
298-
299-
IntrusiveRefCntPtr<DiagnosticOptions> DiagOpts = new DiagnosticOptions();
300-
DiagOpts->ShowColors = (ShowColors && !NoShowColors);
301-
302-
IntrusiveRefCntPtr<DiagnosticIDs> DiagID(new DiagnosticIDs());
303-
IntrusiveRefCntPtr<DiagnosticsEngine> Diags(
304-
new DiagnosticsEngine(DiagID, &*DiagOpts));
305-
306-
IntrusiveRefCntPtr<llvm::vfs::InMemoryFileSystem> InMemoryFileSystem(
307-
new llvm::vfs::InMemoryFileSystem);
308-
FileManager Files(FileSystemOptions(), InMemoryFileSystem);
309-
SourceManager Sources(*Diags, Files);
310-
FileID FileID = createInMemoryFile(AssumedFileName, Code.get(), Sources,
311-
Files, InMemoryFileSystem.get());
312-
313-
FileManager &FileMgr = Sources.getFileManager();
314-
llvm::ErrorOr<const FileEntry *> FileEntryPtr =
315-
FileMgr.getFile(AssumedFileName);
316297

317298
unsigned Errors = 0;
318299
if (WarnFormat && !NoWarnFormat) {
319300
llvm::SourceMgr Mgr;
320-
for (const auto &R : Replaces) {
321-
PresumedLoc PLoc = Sources.getPresumedLoc(
322-
Sources.getLocForStartOfFile(FileID).getLocWithOffset(R.getOffset()));
323-
324-
SourceLocation LineBegin =
325-
Sources.translateFileLineCol(FileEntryPtr.get(), PLoc.getLine(), 1);
326-
SourceLocation NextLineBegin = Sources.translateFileLineCol(
327-
FileEntryPtr.get(), PLoc.getLine() + 1, 1);
301+
const char *StartBuf = Code->getBufferStart();
328302

329-
const char *StartBuf = Sources.getCharacterData(LineBegin);
330-
const char *EndBuf = Sources.getCharacterData(NextLineBegin);
331-
332-
StringRef Line(StartBuf, (EndBuf - StartBuf) - 1);
333-
334-
SMDiagnostic Diag(
335-
Mgr, SMLoc::getFromPointer(StartBuf), AssumedFileName,
336-
PLoc.getLine(), PLoc.getColumn(),
303+
Mgr.AddNewSourceBuffer(
304+
MemoryBuffer::getMemBuffer(StartBuf, AssumedFileName), SMLoc());
305+
for (const auto &R : Replaces) {
306+
SMDiagnostic Diag = Mgr.GetMessage(
307+
SMLoc::getFromPointer(StartBuf + R.getOffset()),
337308
WarningsAsErrors ? SourceMgr::DiagKind::DK_Error
338309
: SourceMgr::DiagKind::DK_Warning,
339-
"code should be clang-formatted [-Wclang-format-violations]", Line,
340-
ArrayRef<std::pair<unsigned, unsigned>>());
310+
"code should be clang-formatted [-Wclang-format-violations]");
341311

342312
Diag.print(nullptr, llvm::errs(), (ShowColors && !NoShowColors));
343-
Errors++;
344-
if (ErrorLimit && Errors >= ErrorLimit)
313+
if (ErrorLimit && ++Errors >= ErrorLimit)
345314
break;
346315
}
347316
}

libcxx/www/cxx2a_status.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ <h3>Paper Status</h3>
209209
<tr><td><a href="https://wg21.link/P1721">P1721</a></td><td>LWG</td><td>Mandating the Standard Library: Clause 29 - Input/Output library </td><td>Belfast</td><td><i> </i></td><td></td></tr>
210210
<tr><td><a href="https://wg21.link/P1722">P1722</a></td><td>LWG</td><td>Mandating the Standard Library: Clause 30 - Regular Expression library </td><td>Belfast</td><td><i> </i></td><td></td></tr>
211211
<tr><td><a href="https://wg21.link/P1723">P1723</a></td><td>LWG</td><td>Mandating the Standard Library: Clause 31 - Atomics library </td><td>Belfast</td><td><i> </i></td><td></td></tr>
212-
<tr><td><a href="https://wg21.link/P1855">P1855</a></td><td>LWG</td><td>Make <compare> freestanding </td><td>Belfast</td><td><i> </i></td><td></td></tr>
212+
<tr><td><a href="https://wg21.link/P1855">P1855</a></td><td>LWG</td><td>Make <tt>&lt;compare&gt;</tt> freestanding</td><td>Belfast</td><td><i> </i></td><td></td></tr>
213213
<tr><td><a href="https://wg21.link/P1862">P1862</a></td><td>LWG</td><td>Ranges adaptors for non-copyable iterators </td><td>Belfast</td><td><i> </i></td><td></td></tr>
214214
<tr><td><a href="https://wg21.link/P1865">P1865</a></td><td>LWG</td><td>Add max() to latch and barrier </td><td>Belfast</td><td><i> </i></td><td></td></tr>
215215
<tr><td><a href="https://wg21.link/P1869">P1869</a></td><td>LWG</td><td>Rename 'condition_variable_any' interruptible wait methods </td><td>Belfast</td><td><i> </i></td><td></td></tr>

lld/COFF/SymbolTable.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,6 @@ void SymbolTable::loadMinGWAutomaticImports() {
227227
auto *undef = dyn_cast<Undefined>(sym);
228228
if (!undef)
229229
continue;
230-
if (!sym->isUsedInRegularObj)
231-
continue;
232230
if (undef->getWeakAlias())
233231
continue;
234232

lld/test/COFF/autoimport-lto.ll

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
; REQUIRES: x86
2+
3+
; RUN: echo -e ".global variable\n.global DllMainCRTStartup\n.text\nDllMainCRTStartup:\nret\n.data\nvariable:\n.long 42" > %t-lib.s
4+
; RUN: llvm-mc -triple=x86_64-windows-gnu %t-lib.s -filetype=obj -o %t-lib.obj
5+
; RUN: lld-link -out:%t-lib.dll -dll -entry:DllMainCRTStartup %t-lib.obj -lldmingw -implib:%t-lib.lib
6+
7+
; RUN: llvm-as -o %t.obj %s
8+
; RUN: lld-link -lldmingw -out:%t.exe -entry:entry %t.obj %t-lib.lib
9+
10+
; RUN: llvm-readobj --coff-imports %t.exe | FileCheck -check-prefix=IMPORTS %s
11+
12+
; IMPORTS: Import {
13+
; IMPORTS-NEXT: Name: autoimport-lto.ll.tmp-lib.dll
14+
; IMPORTS-NEXT: ImportLookupTableRVA:
15+
; IMPORTS-NEXT: ImportAddressTableRVA:
16+
; IMPORTS-NEXT: Symbol: variable (0)
17+
; IMPORTS-NEXT: }
18+
19+
target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
20+
target triple = "x86_64-w64-windows-gnu"
21+
22+
@variable = external global i32
23+
24+
define i32 @entry() {
25+
entry:
26+
%0 = load i32, i32* @variable
27+
ret i32 %0
28+
}

lldb/include/lldb/Breakpoint/Breakpoint.h

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ class Breakpoint : public std::enable_shared_from_this<Breakpoint>,
193193
/// Tell this breakpoint to scan a given module list and resolve any new
194194
/// locations that match the breakpoint's specifications.
195195
///
196-
/// \param[in] changed_modules
196+
/// \param[in] module_list
197197
/// The list of modules to look in for new locations.
198198
///
199199
/// \param[in] new_locations
@@ -205,7 +205,7 @@ class Breakpoint : public std::enable_shared_from_this<Breakpoint>,
205205
/// which case we will remove any locations that are in modules that got
206206
/// unloaded.
207207
///
208-
/// \param[in] changedModules
208+
/// \param[in] changed_modules
209209
/// The list of modules to look in for new locations.
210210
/// \param[in] load_event
211211
/// If \b true then the modules were loaded, if \b false, unloaded.
@@ -372,10 +372,6 @@ class Breakpoint : public std::enable_shared_from_this<Breakpoint>,
372372
/// If \b true the callback will be run on the private event thread
373373
/// before the stop event gets reported. If false, the callback will get
374374
/// handled on the public event thread after the stop has been posted.
375-
///
376-
/// \return
377-
/// \b true if the process should stop when you hit the breakpoint.
378-
/// \b false if it should continue.
379375
void SetCallback(BreakpointHitCallback callback, void *baton,
380376
bool is_synchronous = false);
381377

@@ -522,7 +518,7 @@ class Breakpoint : public std::enable_shared_from_this<Breakpoint>,
522518
if (name_to_remove)
523519
m_name_list.erase(name_to_remove);
524520
}
525-
521+
526522
public:
527523
bool MatchesName(const char *name) {
528524
return m_name_list.find(name) != m_name_list.end();
@@ -554,14 +550,14 @@ class Breakpoint : public std::enable_shared_from_this<Breakpoint>,
554550
lldb::BreakpointPreconditionSP GetPrecondition() { return m_precondition_sp; }
555551

556552
// Produces the OR'ed values for all the names assigned to this breakpoint.
557-
const BreakpointName::Permissions &GetPermissions() const {
558-
return m_permissions;
553+
const BreakpointName::Permissions &GetPermissions() const {
554+
return m_permissions;
559555
}
560556

561-
BreakpointName::Permissions &GetPermissions() {
562-
return m_permissions;
557+
BreakpointName::Permissions &GetPermissions() {
558+
return m_permissions;
563559
}
564-
560+
565561
bool AllowList() const {
566562
return GetPermissions().GetAllowList();
567563
}

lldb/include/lldb/Breakpoint/BreakpointID.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class BreakpointID {
6565
/// If it is a mal-formed breakpoint name, error will be set to an appropriate
6666
/// error string.
6767
///
68-
/// \param[in] input
68+
/// \param[in] str
6969
/// A string containing JUST the breakpoint description.
7070
/// \param[out] error
7171
/// If the name is a well-formed breakpoint name, set to success,

lldb/include/lldb/Breakpoint/BreakpointList.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ class BreakpointList {
138138

139139
/// Sets the passed in Locker to hold the Breakpoint List mutex.
140140
///
141-
/// \param[in] locker
141+
/// \param[in] lock
142142
/// The locker object that is set.
143143
void GetListMutex(std::unique_lock<std::recursive_mutex> &lock);
144144

lldb/include/lldb/Breakpoint/BreakpointLocation.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ class BreakpointLocation
9393

9494
/// Set the breakpoint to ignore the next \a count breakpoint hits.
9595
///
96-
/// \param[in] count
96+
/// \param[in] n
9797
/// The number of breakpoint hits to ignore.
9898
void SetIgnoreCount(uint32_t n);
9999

@@ -224,9 +224,6 @@ class BreakpointLocation
224224
/// \param[in] context
225225
/// Described the breakpoint event.
226226
///
227-
/// \param[in] bp_loc_id
228-
/// Which breakpoint location hit this breakpoint.
229-
///
230227
/// \return
231228
/// \b true if the target should stop at this breakpoint and \b
232229
/// false not.

lldb/include/lldb/Breakpoint/BreakpointLocationCollection.h

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,14 @@ class BreakpointLocationCollection {
2222
BreakpointLocationCollection();
2323

2424
~BreakpointLocationCollection();
25-
25+
2626
BreakpointLocationCollection &operator=(const BreakpointLocationCollection &rhs);
2727

2828
/// Add the breakpoint \a bp_loc_sp to the list.
2929
///
30-
/// \param[in] bp_sp
30+
/// \param[in] bp_loc_sp
3131
/// Shared pointer to the breakpoint location that will get added
3232
/// to the list.
33-
///
34-
/// \result
35-
/// Returns breakpoint location id.
3633
void Add(const lldb::BreakpointLocationSP &bp_loc_sp);
3734

3835
/// Removes the breakpoint location given by \b breakID from this
@@ -66,7 +63,7 @@ class BreakpointLocationCollection {
6663
/// Returns a shared pointer to the breakpoint location with id \a
6764
/// breakID, const version.
6865
///
69-
/// \param[in] breakID
66+
/// \param[in] break_id
7067
/// The breakpoint location ID to seek for.
7168
///
7269
/// \param[in] break_loc_id
@@ -112,9 +109,6 @@ class BreakpointLocationCollection {
112109
/// \param[in] context
113110
/// This contains the information about this stop.
114111
///
115-
/// \param[in] breakID
116-
/// This break ID that we hit.
117-
///
118112
/// \return
119113
/// \b true if we should stop, \b false otherwise.
120114
bool ShouldStop(StoppointCallbackContext *context);

lldb/include/lldb/Breakpoint/BreakpointLocationList.h

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class BreakpointLocationList {
7575
/// \param[in] module
7676
/// The module to seek in.
7777
///
78-
/// \param[in]
78+
/// \param[in] bp_loc_list
7979
/// A breakpoint collection that gets any breakpoint locations
8080
/// that match \a module appended to.
8181
///
@@ -166,14 +166,6 @@ class BreakpointLocationList {
166166
/// list.
167167
BreakpointLocationList(Breakpoint &owner);
168168

169-
/// Add the breakpoint \a bp_loc_sp to the list.
170-
///
171-
/// \param[in] bp_sp
172-
/// Shared pointer to the breakpoint location that will get
173-
/// added to the list.
174-
///
175-
/// \result
176-
/// Returns breakpoint location id.
177169
lldb::BreakpointLocationSP Create(const Address &addr,
178170
bool resolve_indirect_symbols);
179171

@@ -189,7 +181,7 @@ class BreakpointLocationList {
189181
lldb::BreakpointLocationSP from_location_sp);
190182

191183
bool RemoveLocation(const lldb::BreakpointLocationSP &bp_loc_sp);
192-
184+
193185
void RemoveLocationByIndex(size_t idx);
194186

195187
void RemoveInvalidLocations(const ArchSpec &arch);

lldb/include/lldb/Breakpoint/BreakpointResolver.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@ class BreakpointResolver : public Searcher {
4444
/// The breakpoint that owns this resolver.
4545
/// \param[in] resolverType
4646
/// The concrete breakpoint resolver type for this breakpoint.
47-
///
48-
/// \result
49-
/// Returns breakpoint location id.
5047
BreakpointResolver(Breakpoint *bkpt, unsigned char resolverType,
5148
lldb::addr_t offset = 0);
5249

@@ -186,7 +183,7 @@ class BreakpointResolver : public Searcher {
186183
};
187184
static const char
188185
*g_option_names[static_cast<uint32_t>(OptionNames::LastOptionName)];
189-
186+
190187
virtual void NotifyBreakpointSet() {};
191188

192189
public:

lldb/include/lldb/Breakpoint/BreakpointSite.h

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -99,15 +99,12 @@ class BreakpointSite : public std::enable_shared_from_this<BreakpointSite>,
9999
bool ShouldStop(StoppointCallbackContext *context) override;
100100

101101
/// Standard Dump method
102-
///
103-
/// \param[in] context
104-
/// The stream to dump this output.
105102
void Dump(Stream *s) const override;
106103

107104
/// The "Owners" are the breakpoint locations that share this breakpoint
108105
/// site. The method adds the \a owner to this breakpoint site's owner list.
109106
///
110-
/// \param[in] context
107+
/// \param[in] owner
111108
/// \a owner is the Breakpoint Location to add.
112109
void AddOwner(const lldb::BreakpointLocationSP &owner);
113110

@@ -123,8 +120,9 @@ class BreakpointSite : public std::enable_shared_from_this<BreakpointSite>,
123120
/// GetNumberOfOwners() - 1 so you can use this method to iterate over the
124121
/// owners
125122
///
126-
/// \param[in] index
123+
/// \param[in] idx
127124
/// The index in the list of owners for which you wish the owner location.
125+
///
128126
/// \return
129127
/// A shared pointer to the breakpoint location at that index.
130128
lldb::BreakpointLocationSP GetOwnerAtIndex(size_t idx);
@@ -201,9 +199,6 @@ class BreakpointSite : public std::enable_shared_from_this<BreakpointSite>,
201199

202200
/// The method removes the owner at \a break_loc_id from this breakpoint
203201
/// list.
204-
///
205-
/// \param[in] context
206-
/// \a break_loc_id is the Breakpoint Location to remove.
207202
size_t RemoveOwner(lldb::break_id_t break_id, lldb::break_id_t break_loc_id);
208203

209204
BreakpointSite::Type m_type; ///< The type of this breakpoint site.

lldb/include/lldb/Breakpoint/Watchpoint.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ class Watchpoint : public std::enable_shared_from_this<Watchpoint>,
6969
// This doesn't really enable/disable the watchpoint. It is currently just
7070
// for use in the Process plugin's {Enable,Disable}Watchpoint, which should
7171
// be used instead.
72-
7372
void SetEnabled(bool enabled, bool notify = true);
7473

7574
bool IsHardware() const override;
@@ -113,10 +112,6 @@ class Watchpoint : public std::enable_shared_from_this<Watchpoint>,
113112
/// If \b true the callback will be run on the private event thread
114113
/// before the stop event gets reported. If false, the callback will get
115114
/// handled on the public event thread after the stop has been posted.
116-
///
117-
/// \return
118-
/// \b true if the process should stop when you hit the watchpoint.
119-
/// \b false if it should continue.
120115
void SetCallback(WatchpointHitCallback callback, void *callback_baton,
121116
bool is_synchronous = false);
122117

0 commit comments

Comments
 (0)