Skip to content

Commit 2ea11b5

Browse files
committed
runtime: remove use of swift/LLVM.h (NFC)
Rather than using the forward declaration for the LLVMSupport types, expect to be able to use the full declaration. Because these are references in the implementation, there is no reason to use a forward declaration as the full types need to be declared for use. The LLVM headers will provide the declaration and definition for the types. This is motivated by the desire to ensure that the LLVMSupport symbols are properly namespaced to avoid ODR violations in the runtime.
1 parent de6d393 commit 2ea11b5

File tree

7 files changed

+1
-8
lines changed

7 files changed

+1
-8
lines changed

stdlib/public/runtime/Casting.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
#include "ExistentialMetadataImpl.h"
2222
#include "Private.h"
2323
#include "SwiftHashableSupport.h"
24-
#include "swift/Basic/LLVM.h"
2524
#include "swift/Basic/Lazy.h"
2625
#include "swift/Demangling/Demangler.h"
2726
#include "swift/Runtime/Config.h"

stdlib/public/runtime/Errors.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
#include "swift/Runtime/Debug.h"
4141
#include "swift/Runtime/Mutex.h"
4242
#include "swift/Demangling/Demangle.h"
43-
#include "swift/Basic/LLVM.h"
4443
#include "llvm/ADT/StringRef.h"
4544

4645
#if defined(_MSC_VER)
@@ -150,7 +149,7 @@ void swift::dumpStackTraceEntry(unsigned index, void *framePC,
150149
// library name here. Avoid using StringRef::rsplit because its definition
151150
// is not provided in the header so that it requires linking with
152151
// libSupport.a.
153-
StringRef libraryName = StringRef(syminfo.fileName);
152+
llvm::StringRef libraryName{syminfo.fileName};
154153
libraryName = libraryName.substr(libraryName.rfind('/')).substr(1);
155154

156155
// Next we get the symbol name that we are going to use in our backtrace.

stdlib/public/runtime/Metadata.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
#include "swift/Runtime/Metadata.h"
1818
#include "MetadataCache.h"
19-
#include "swift/Basic/LLVM.h"
2019
#include "swift/Basic/Lazy.h"
2120
#include "swift/Basic/Range.h"
2221
#include "swift/Demangling/Demangler.h"

stdlib/public/runtime/MetadataLookup.cpp

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/Basic/Lazy.h"
1918
#include "swift/Demangling/Demangler.h"
2019
#include "swift/Demangling/TypeDecoder.h"

stdlib/public/runtime/ProtocolConformance.cpp

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/Basic/Lazy.h"
1918
#include "swift/Demangling/Demangle.h"
2019
#include "swift/Runtime/Casting.h"

stdlib/public/runtime/SwiftObject.mm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
#include <objc/objc.h>
2525
#endif
2626
#include "llvm/ADT/StringRef.h"
27-
#include "swift/Basic/LLVM.h"
2827
#include "swift/Basic/Lazy.h"
2928
#include "swift/Runtime/Casting.h"
3029
#include "swift/Runtime/Heap.h"

stdlib/public/stubs/OptionalBridgingHelper.mm

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

1515
#if SWIFT_OBJC_INTEROP
1616
#include "swift/Basic/Lazy.h"
17-
#include "swift/Basic/LLVM.h"
1817
#include "swift/Runtime/Metadata.h"
1918
#include "swift/Runtime/Mutex.h"
2019
#include "swift/Runtime/ObjCBridge.h"

0 commit comments

Comments
 (0)