Files
swift-mirror/test/PCMacro/Inputs/PCMacroRuntime.swift
Maxwell Swadling 214efbfc3c Added a new AST Walker that instruments the AST to provide callbacks that simulate a program counter
Based off the PlaygroundTransform, this new ASTWalker leaves calls to __builtin_pc_before and __builtin_pc_after before and after a user would expect a program counter to enter a range of source code.
2016-12-19 10:56:40 -08:00

11 lines
346 B
Swift

// This is the minimal amount of runtime required to operate
// lib/Sema/PCMacro.cpp successfully.
func __builtin_pc_before(_ sl : Int, _ el : Int, _ sc : Int, _ ec: Int) {
print("[\(sl):\(sc)-\(el):\(ec)] pc before")
}
func __builtin_pc_after(_ sl : Int, _ el : Int, _ sc : Int, _ ec: Int) {
print("[\(sl):\(sc)-\(el):\(ec)] pc after")
}