@@ -41,21 +41,21 @@ public protocol _IRMetadataInitializerHack {
41
41
/// to compile a program to native machine code and standard debugging
42
42
/// formats. This allows compatibility with traditional machine-code level
43
43
/// debuggers, like GDB, DBX, or CodeView.
44
- public protocol Metadata : _IRMetadataInitializerHack {
44
+ public protocol IRMetadata : _IRMetadataInitializerHack {
45
45
/// Retrieves the underlying LLVM metadata object.
46
46
func asMetadata( ) -> LLVMMetadataRef
47
47
}
48
48
49
- extension Metadata {
49
+ extension IRMetadata {
50
50
/// Replaces all uses of the this metadata with the given metadata.
51
51
///
52
52
/// - parameter metadata: The new value to swap in.
53
- public func replaceAllUses( with metadata: Metadata ) {
53
+ public func replaceAllUses( with metadata: IRMetadata ) {
54
54
LLVMMetadataReplaceAllUsesWith ( self . asMetadata ( ) , metadata. asMetadata ( ) )
55
55
}
56
56
}
57
57
58
- extension Metadata {
58
+ extension IRMetadata {
59
59
/// Dumps a representation of this metadata to stderr.
60
60
public func dump( ) {
61
61
LLVMDumpValue ( LLVMMetadataAsValue ( LLVMGetGlobalContext ( ) , self . asMetadata ( ) ) )
@@ -66,13 +66,13 @@ extension Metadata {
66
66
/// - warning: In general, use of this method is discouraged and can
67
67
/// lead to unpredictable results or undefined behavior. No checks are
68
68
/// performed before, during, or after the cast.
69
- public func forceCast< DestTy: Metadata > ( to: DestTy . Type ) -> DestTy {
69
+ public func forceCast< DestTy: IRMetadata > ( to: DestTy . Type ) -> DestTy {
70
70
return DestTy ( llvm: self . asMetadata ( ) )
71
71
}
72
72
}
73
73
74
74
/// Denotes a scope in which child metadata nodes can be inserted.
75
- public protocol DIScope : Metadata { }
75
+ public protocol DIScope : IRMetadata { }
76
76
77
77
/// Denotes metadata for a type.
78
78
public protocol DIType : DIScope { }
@@ -113,7 +113,7 @@ extension DIType {
113
113
}
114
114
115
115
/// A `DebugLocation` represents a location in source.
116
- public struct DebugLocation : Metadata {
116
+ public struct DebugLocation : IRMetadata {
117
117
internal let llvm : LLVMMetadataRef
118
118
119
119
public func asMetadata( ) -> LLVMMetadataRef {
@@ -140,7 +140,7 @@ public struct DebugLocation: Metadata {
140
140
}
141
141
}
142
142
143
- struct AnyMetadata : Metadata {
143
+ struct AnyMetadata : IRMetadata {
144
144
let llvm : LLVMMetadataRef
145
145
146
146
func asMetadata( ) -> LLVMMetadataRef {
@@ -271,7 +271,7 @@ public struct LexicalBlockFileMetadata: DIScope {
271
271
272
272
/// `LocalVariableMetadata` nodes represent local variables and function
273
273
/// parameters in the source language.
274
- public struct LocalVariableMetadata : Metadata {
274
+ public struct LocalVariableMetadata : IRMetadata {
275
275
internal let llvm : LLVMMetadataRef
276
276
277
277
public func asMetadata( ) -> LLVMMetadataRef {
@@ -284,7 +284,7 @@ public struct LocalVariableMetadata: Metadata {
284
284
}
285
285
286
286
/// `ObjectiveCPropertyMetadata` nodes represent Objective-C property nodes.
287
- public struct ObjectiveCPropertyMetadata : Metadata {
287
+ public struct ObjectiveCPropertyMetadata : IRMetadata {
288
288
internal let llvm : LLVMMetadataRef
289
289
290
290
public func asMetadata( ) -> LLVMMetadataRef {
@@ -362,7 +362,7 @@ public struct NameSpaceMetadata: DIScope {
362
362
///
363
363
/// Though DWARF supports hundreds of expressions, LLVM currently implements
364
364
/// a very limited subset.
365
- public struct ExpressionMetadata : Metadata {
365
+ public struct ExpressionMetadata : IRMetadata {
366
366
internal let llvm : LLVMMetadataRef
367
367
368
368
public func asMetadata( ) -> LLVMMetadataRef {
0 commit comments