@@ -41,21 +41,21 @@ public protocol _IRMetadataInitializerHack {
4141/// to compile a program to native machine code and standard debugging
4242/// formats. This allows compatibility with traditional machine-code level
4343/// debuggers, like GDB, DBX, or CodeView.
44- public protocol Metadata : _IRMetadataInitializerHack {
44+ public protocol IRMetadata : _IRMetadataInitializerHack {
4545 /// Retrieves the underlying LLVM metadata object.
4646 func asMetadata( ) -> LLVMMetadataRef
4747}
4848
49- extension Metadata {
49+ extension IRMetadata {
5050 /// Replaces all uses of the this metadata with the given metadata.
5151 ///
5252 /// - parameter metadata: The new value to swap in.
53- public func replaceAllUses( with metadata: Metadata ) {
53+ public func replaceAllUses( with metadata: IRMetadata ) {
5454 LLVMMetadataReplaceAllUsesWith ( self . asMetadata ( ) , metadata. asMetadata ( ) )
5555 }
5656}
5757
58- extension Metadata {
58+ extension IRMetadata {
5959 /// Dumps a representation of this metadata to stderr.
6060 public func dump( ) {
6161 LLVMDumpValue ( LLVMMetadataAsValue ( LLVMGetGlobalContext ( ) , self . asMetadata ( ) ) )
@@ -66,13 +66,13 @@ extension Metadata {
6666 /// - warning: In general, use of this method is discouraged and can
6767 /// lead to unpredictable results or undefined behavior. No checks are
6868 /// 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 {
7070 return DestTy ( llvm: self . asMetadata ( ) )
7171 }
7272}
7373
7474/// Denotes a scope in which child metadata nodes can be inserted.
75- public protocol DIScope : Metadata { }
75+ public protocol DIScope : IRMetadata { }
7676
7777/// Denotes metadata for a type.
7878public protocol DIType : DIScope { }
@@ -113,7 +113,7 @@ extension DIType {
113113}
114114
115115/// A `DebugLocation` represents a location in source.
116- public struct DebugLocation : Metadata {
116+ public struct DebugLocation : IRMetadata {
117117 internal let llvm : LLVMMetadataRef
118118
119119 public func asMetadata( ) -> LLVMMetadataRef {
@@ -140,7 +140,7 @@ public struct DebugLocation: Metadata {
140140 }
141141}
142142
143- struct AnyMetadata : Metadata {
143+ struct AnyMetadata : IRMetadata {
144144 let llvm : LLVMMetadataRef
145145
146146 func asMetadata( ) -> LLVMMetadataRef {
@@ -271,7 +271,7 @@ public struct LexicalBlockFileMetadata: DIScope {
271271
272272/// `LocalVariableMetadata` nodes represent local variables and function
273273/// parameters in the source language.
274- public struct LocalVariableMetadata : Metadata {
274+ public struct LocalVariableMetadata : IRMetadata {
275275 internal let llvm : LLVMMetadataRef
276276
277277 public func asMetadata( ) -> LLVMMetadataRef {
@@ -284,7 +284,7 @@ public struct LocalVariableMetadata: Metadata {
284284}
285285
286286/// `ObjectiveCPropertyMetadata` nodes represent Objective-C property nodes.
287- public struct ObjectiveCPropertyMetadata : Metadata {
287+ public struct ObjectiveCPropertyMetadata : IRMetadata {
288288 internal let llvm : LLVMMetadataRef
289289
290290 public func asMetadata( ) -> LLVMMetadataRef {
@@ -362,7 +362,7 @@ public struct NameSpaceMetadata: DIScope {
362362///
363363/// Though DWARF supports hundreds of expressions, LLVM currently implements
364364/// a very limited subset.
365- public struct ExpressionMetadata : Metadata {
365+ public struct ExpressionMetadata : IRMetadata {
366366 internal let llvm : LLVMMetadataRef
367367
368368 public func asMetadata( ) -> LLVMMetadataRef {
0 commit comments