Files
swift-mirror/test/IRGen/has_symbol_clang.swift
Dario Rexin 38bd7f436e [Tests] Fix IRGen tests for new LLVM version
rdar://132124067

LLVM code gen has changed, so we need to adjust the expected output in our tests accordingly
2024-07-23 11:23:32 -07:00

17 lines
555 B
Swift

// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend -emit-irgen %s -I %t -I %S/Inputs/has_symbol -module-name test | %FileCheck %s
// UNSUPPORTED: OS=windows-msvc
@_weakLinked import has_symbol_helper_clang
public func testClangDecls() {
// CHECK: %{{[0-9]+}} = call i1 @"$sSo9clangFuncyys5Int32VFTwS"()
if #_hasSymbol(clangFunc(_:)) {}
}
// --- clangFunc(_:) ---
// CHECK: define linkonce_odr hidden i1 @"$sSo9clangFuncyys5Int32VFTwS"() #1{{( comdat)?}} {
// CHECK: [[RES:%.*]] = icmp ne ptr @clangFunc, null
// CHECK: ret i1 [[RES]]