mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[NFC] Remove RC Alias
Expand it to llvm::IntrusiveRefCntPtr
This commit is contained in:
@@ -18,7 +18,6 @@
|
||||
#ifndef SWIFT_MIGRATOR_MIGRATIONSTATE_H
|
||||
#define SWIFT_MIGRATOR_MIGRATIONSTATE_H
|
||||
|
||||
#include "swift/Syntax/References.h"
|
||||
#include "llvm/ADT/IntrusiveRefCntPtr.h"
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
|
||||
@@ -78,19 +77,19 @@ struct MigrationState : public llvm::ThreadSafeRefCountedBase<MigrationState> {
|
||||
return InputBufferID == OutputBufferID;
|
||||
}
|
||||
|
||||
static RC<MigrationState>
|
||||
static llvm::IntrusiveRefCntPtr<MigrationState>
|
||||
start(SourceManager &SrcMgr, const unsigned InputBufferID) {
|
||||
return RC<MigrationState> {
|
||||
return llvm::IntrusiveRefCntPtr<MigrationState> {
|
||||
new MigrationState {
|
||||
MigrationKind::Start, SrcMgr, InputBufferID, InputBufferID
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
static RC<MigrationState>
|
||||
static llvm::IntrusiveRefCntPtr<MigrationState>
|
||||
make(MigrationKind Kind, SourceManager &SrcMgr, const unsigned InputBufferID,
|
||||
const unsigned OutputBufferID) {
|
||||
return RC<MigrationState> {
|
||||
return llvm::IntrusiveRefCntPtr<MigrationState> {
|
||||
new MigrationState {
|
||||
Kind,
|
||||
SrcMgr,
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#define SWIFT_MIGRATOR_MIGRATOR_H
|
||||
|
||||
#include "swift/Migrator/MigrationState.h"
|
||||
#include "swift/Syntax/References.h"
|
||||
#include "llvm/ADT/IntrusiveRefCntPtr.h"
|
||||
|
||||
namespace swift {
|
||||
class CompilerInstance;
|
||||
@@ -39,7 +39,7 @@ struct Migrator {
|
||||
CompilerInstance *StartInstance;
|
||||
const CompilerInvocation &StartInvocation;
|
||||
SourceManager SrcMgr;
|
||||
std::vector<RC<MigrationState>> States;
|
||||
std::vector<llvm::IntrusiveRefCntPtr<MigrationState>> States;
|
||||
|
||||
Migrator(CompilerInstance *StartInstance,
|
||||
const CompilerInvocation &StartInvocation);
|
||||
|
||||
Reference in New Issue
Block a user