Files
swift-mirror/test/DebugInfo/macro.swift
Saleem Abdulrasool 440b39a263 test: adjust DebugInfo tests for new LLVM update
The filename on Windows now uses `\\` rather than `\\5C` for the path
separator.  Adjust the tests accordingly.
2020-01-13 15:13:38 -08:00

21 lines
573 B
Swift

// RUN: %target-swift-frontend -emit-ir %s -g -I %S/Inputs -o - \
// RUN: -parse-as-library | %FileCheck %s
// The source file for "macro_enum", which is defined using a macro, should be
// correctly identified.
// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "macro_enum",
// CHECK-SAME: file: ![[MACRO_H:[0-9]+]]
// CHECK: ![[MACRO_H]] = !DIFile(filename: "{{.*}}{{(/|\\\\)}}Inputs{{(/|\\\\)}}Macro.h",
import Macro
public func f(_ e : macro_enum) -> Int32 {
switch (e) {
case zero:
return 0
default:
return e.rawValue
}
}