@@ -248,8 +248,9 @@ class TypeRefBuilder {
248
248
249
249
public:
250
250
using BuiltType = const TypeRef *;
251
- using BuiltTypeDecl = Optional<std::string>;
252
- using BuiltProtocolDecl = Optional<std::pair<std::string, bool /* isObjC*/ >>;
251
+ using BuiltTypeDecl = llvm::Optional<std::string>;
252
+ using BuiltProtocolDecl =
253
+ llvm::Optional<std::pair<std::string, bool /* isObjC*/ >>;
253
254
254
255
TypeRefBuilder (const TypeRefBuilder &other) = delete ;
255
256
TypeRefBuilder &operator =(const TypeRefBuilder &other) = delete ;
@@ -295,8 +296,7 @@ class TypeRefBuilder {
295
296
return BuiltinTypeRef::create (*this , mangledName);
296
297
}
297
298
298
- Optional<std::string>
299
- createTypeDecl (Node *node, bool &typeAlias) {
299
+ llvm::Optional<std::string> createTypeDecl (Node *node, bool &typeAlias) {
300
300
return Demangle::mangleNode (node);
301
301
}
302
302
@@ -310,25 +310,25 @@ class TypeRefBuilder {
310
310
return std::make_pair (name, true );
311
311
}
312
312
313
- Optional<std::string> createTypeDecl (std::string &&mangledName,
314
- bool &typeAlias) {
313
+ llvm:: Optional<std::string> createTypeDecl (std::string &&mangledName,
314
+ bool &typeAlias) {
315
315
return std::move (mangledName);
316
316
}
317
-
318
- const NominalTypeRef *createNominalType (
319
- const Optional<std::string> &mangledName) {
317
+
318
+ const NominalTypeRef *
319
+ createNominalType ( const llvm:: Optional<std::string> &mangledName) {
320
320
return NominalTypeRef::create (*this , *mangledName, nullptr );
321
321
}
322
322
323
- const NominalTypeRef *createNominalType (
324
- const Optional<std::string> &mangledName,
325
- const TypeRef *parent) {
323
+ const NominalTypeRef *
324
+ createNominalType ( const llvm:: Optional<std::string> &mangledName,
325
+ const TypeRef *parent) {
326
326
return NominalTypeRef::create (*this , *mangledName, parent);
327
327
}
328
328
329
- const TypeRef *createTypeAliasType (
330
- const Optional<std::string> &mangledName,
331
- const TypeRef *parent) {
329
+ const TypeRef *
330
+ createTypeAliasType ( const llvm:: Optional<std::string> &mangledName,
331
+ const TypeRef *parent) {
332
332
// TypeRefs don't contain sugared types
333
333
return nullptr ;
334
334
}
@@ -354,13 +354,13 @@ class TypeRefBuilder {
354
354
}
355
355
356
356
const BoundGenericTypeRef *
357
- createBoundGenericType (const Optional<std::string> &mangledName,
357
+ createBoundGenericType (const llvm:: Optional<std::string> &mangledName,
358
358
const std::vector<const TypeRef *> &args) {
359
359
return BoundGenericTypeRef::create (*this , *mangledName, args, nullptr );
360
360
}
361
361
362
362
const BoundGenericTypeRef *
363
- createBoundGenericType (const Optional<std::string> &mangledName,
363
+ createBoundGenericType (const llvm:: Optional<std::string> &mangledName,
364
364
llvm::ArrayRef<const TypeRef *> args,
365
365
const TypeRef *parent) {
366
366
return BoundGenericTypeRef::create (*this , *mangledName, args, parent);
@@ -420,7 +420,7 @@ class TypeRefBuilder {
420
420
Demangle::ImplParameterConvention calleeConvention,
421
421
llvm::ArrayRef<Demangle::ImplFunctionParam<const TypeRef *>> params,
422
422
llvm::ArrayRef<Demangle::ImplFunctionResult<const TypeRef *>> results,
423
- Optional<Demangle::ImplFunctionResult<const TypeRef *>> errorResult,
423
+ llvm:: Optional<Demangle::ImplFunctionResult<const TypeRef *>> errorResult,
424
424
ImplFunctionTypeFlags flags) {
425
425
// Minimal support for lowered function types. These come up in
426
426
// reflection as capture types. For the reflection library's
@@ -467,14 +467,15 @@ class TypeRefBuilder {
467
467
isClassBound);
468
468
}
469
469
470
- const ExistentialMetatypeTypeRef *
471
- createExistentialMetatypeType ( const TypeRef *instance,
472
- Optional<Demangle::ImplMetatypeRepresentation> repr= None) {
470
+ const ExistentialMetatypeTypeRef *createExistentialMetatypeType (
471
+ const TypeRef *instance,
472
+ llvm:: Optional<Demangle::ImplMetatypeRepresentation> repr = None) {
473
473
return ExistentialMetatypeTypeRef::create (*this , instance);
474
474
}
475
475
476
- const MetatypeTypeRef *createMetatypeType (const TypeRef *instance,
477
- Optional<Demangle::ImplMetatypeRepresentation> repr=None) {
476
+ const MetatypeTypeRef *createMetatypeType (
477
+ const TypeRef *instance,
478
+ llvm::Optional<Demangle::ImplMetatypeRepresentation> repr = None) {
478
479
bool WasAbstract = (repr && *repr != ImplMetatypeRepresentation::Thin);
479
480
return MetatypeTypeRef::create (*this , instance, WasAbstract);
480
481
}
0 commit comments