Skip to content

Commit 36b0baf

Browse files
committed
Add missing override keywords
1 parent 1cafe66 commit 36b0baf

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

lldb/source/Plugins/ExpressionParser/Swift/SwiftASTManipulator.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@ class SwiftASTManipulatorBase {
4848
public:
4949
virtual ~VariableMetadataResult();
5050
constexpr static unsigned Type() { return 'Resu'; }
51-
virtual unsigned GetType() { return Type(); }
51+
unsigned GetType() override { return Type(); }
5252
};
5353

5454
class VariableMetadataError
5555
: public SwiftASTManipulatorBase::VariableMetadata {
5656
public:
5757
virtual ~VariableMetadataError();
5858
constexpr static unsigned Type() { return 'Erro'; }
59-
virtual unsigned GetType() { return Type(); }
59+
unsigned GetType() override { return Type(); }
6060
};
6161

6262
typedef std::shared_ptr<VariableMetadata> VariableMetadataSP;

lldb/source/Plugins/ExpressionParser/Swift/SwiftREPLMaterializer.cpp

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class EntityREPLResultVariable : public Materializer::Entity {
8787
}
8888

8989
void Materialize(lldb::StackFrameSP &frame_sp, IRMemoryMap &map,
90-
lldb::addr_t process_address, Status &err) {
90+
lldb::addr_t process_address, Status &err) override {
9191
// no action required
9292
}
9393

@@ -194,7 +194,7 @@ class EntityREPLResultVariable : public Materializer::Entity {
194194

195195
void Dematerialize(lldb::StackFrameSP &frame_sp, IRMemoryMap &map,
196196
lldb::addr_t process_address, lldb::addr_t frame_top,
197-
lldb::addr_t frame_bottom, Status &err) {
197+
lldb::addr_t frame_bottom, Status &err) override {
198198
IRExecutionUnit *execution_unit =
199199
llvm::cast<SwiftREPLMaterializer>(m_parent)->GetExecutionUnit();
200200

@@ -231,7 +231,8 @@ class EntityREPLResultVariable : public Materializer::Entity {
231231
"Couldn't dematerialize result: corresponding symbol wasn't found");
232232
}
233233

234-
void DumpToLog(IRMemoryMap &map, lldb::addr_t process_address, Log *log) {
234+
void DumpToLog(IRMemoryMap &map, lldb::addr_t process_address,
235+
Log *log) override {
235236
StreamString dump_stream;
236237

237238
const lldb::addr_t load_addr = process_address + m_offset;
@@ -293,7 +294,7 @@ class EntityREPLResultVariable : public Materializer::Entity {
293294
log->PutCString(dump_stream.GetData());
294295
}
295296

296-
void Wipe(IRMemoryMap &map, lldb::addr_t process_address) {
297+
void Wipe(IRMemoryMap &map, lldb::addr_t process_address) override {
297298
m_temporary_allocation = LLDB_INVALID_ADDRESS;
298299
m_temporary_allocation_size = 0;
299300
}
@@ -337,13 +338,13 @@ class EntityREPLPersistentVariable : public Materializer::Entity {
337338
}
338339

339340
void Materialize(lldb::StackFrameSP &frame_sp, IRMemoryMap &map,
340-
lldb::addr_t process_address, Status &err) {
341+
lldb::addr_t process_address, Status &err) override {
341342
// no action required
342343
}
343344

344345
void Dematerialize(lldb::StackFrameSP &frame_sp, IRMemoryMap &map,
345346
lldb::addr_t process_address, lldb::addr_t frame_top,
346-
lldb::addr_t frame_bottom, Status &err) {
347+
lldb::addr_t frame_bottom, Status &err) override {
347348
if (llvm::cast<SwiftExpressionVariable>(m_persistent_variable_sp.get())
348349
->GetIsComputed())
349350
return;
@@ -432,7 +433,8 @@ class EntityREPLPersistentVariable : public Materializer::Entity {
432433
m_persistent_variable_sp->GetName().GetCString());
433434
}
434435

435-
void DumpToLog(IRMemoryMap &map, lldb::addr_t process_address, Log *log) {
436+
void DumpToLog(IRMemoryMap &map, lldb::addr_t process_address,
437+
Log *log) override {
436438
StreamString dump_stream;
437439

438440
Status err;
@@ -491,7 +493,7 @@ class EntityREPLPersistentVariable : public Materializer::Entity {
491493
log->PutCString(dump_stream.GetData());
492494
}
493495

494-
void Wipe(IRMemoryMap &map, lldb::addr_t process_address) {}
496+
void Wipe(IRMemoryMap &map, lldb::addr_t process_address) override {}
495497

496498
private:
497499
lldb::ExpressionVariableSP m_persistent_variable_sp;

0 commit comments

Comments
 (0)