Skip to content

Commit 9dadc0d

Browse files
committed
standard library: remove use of LLVM.h in the compatibility
Remove the use of the `LLVM.h` forward declarations from the compatibility shims. This allows us to fully isolate the target side from the LLVM namespace ensuring that we prevent ODR violations when LLVM is linked into the same address space.
1 parent db8c500 commit 9dadc0d

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

stdlib/toolchain/Compatibility50/Overrides.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
//
1515
//===----------------------------------------------------------------------===//
1616

17-
#include "swift/Basic/LLVM.h"
1817
#include "swift/Runtime/Metadata.h"
1918

2019
namespace swift {

stdlib/toolchain/Compatibility51/Overrides.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,20 @@
1414
//
1515
//===----------------------------------------------------------------------===//
1616

17-
#include "swift/Basic/LLVM.h"
1817
#include "swift/Runtime/Metadata.h"
18+
#include "llvm/ADT/StringRef.h"
1919

2020
namespace swift {
2121

2222
using ConformsToSwiftProtocol_t =
2323
const ProtocolConformanceDescriptor *(const Metadata * const type,
2424
const ProtocolDescriptor *protocol,
25-
StringRef moduleName);
25+
llvm::StringRef moduleName);
2626

2727
const ProtocolConformanceDescriptor *
2828
swift51override_conformsToSwiftProtocol(const Metadata * const type,
2929
const ProtocolDescriptor *protocol,
30-
StringRef moduleName,
30+
llvm::StringRef moduleName,
3131
ConformsToSwiftProtocol_t *original);
3232

3333
} // end namespace swift

0 commit comments

Comments
 (0)