Skip to content

Commit 3fa1d8d

Browse files
committed
runtime: remove forward declaration of llvm::function_ref
The runtime has an embedded copy of LLVMSupport which provides `llvm::function_ref` as `__swift::__runtime::llvm::function_ref`. This forward declaration can cause the inlined namespaces to be ignored. Remove the forward declaration for the runtime.
1 parent f7df8e7 commit 3fa1d8d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

include/swift/Basic/LLVM.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ namespace llvm {
5454
class raw_ostream;
5555
class APInt;
5656
class APFloat;
57+
#if !defined(swiftCore_EXPORTS)
5758
template <typename Fn> class function_ref;
59+
#endif
5860
} // end namespace llvm
5961

6062

@@ -92,7 +94,9 @@ namespace swift {
9294
// Other common classes.
9395
using llvm::APFloat;
9496
using llvm::APInt;
97+
#if !defined(swiftCore_EXPORTS)
9598
using llvm::function_ref;
99+
#endif
96100
using llvm::NoneType;
97101
using llvm::raw_ostream;
98102
} // end namespace swift

0 commit comments

Comments
 (0)