Skip to content

Commit b398098

Browse files
committed
libraries: instead of including all demangler sources into a single C++ source file, list them in the cmake file
1 parent cc6045b commit b398098

File tree

7 files changed

+22
-57
lines changed

7 files changed

+22
-57
lines changed

stdlib/public/Reflection/CMakeLists.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
add_swift_library(swiftReflection STATIC TARGET_LIBRARY FORCE_BUILD_FOR_HOST_SDK
2-
Demangle.cpp
32
MetadataSource.cpp
4-
Remangle.cpp
53
TypeLowering.cpp
64
TypeRef.cpp
75
TypeRefBuilder.cpp
6+
"${SWIFT_SOURCE_DIR}/lib/Demangling/Context.cpp"
7+
"${SWIFT_SOURCE_DIR}/lib/Demangling/OldDemangler.cpp"
8+
"${SWIFT_SOURCE_DIR}/lib/Demangling/Demangler.cpp"
9+
"${SWIFT_SOURCE_DIR}/lib/Demangling/NodePrinter.cpp"
10+
"${SWIFT_SOURCE_DIR}/lib/Demangling/ManglingUtils.cpp"
11+
"${SWIFT_SOURCE_DIR}/lib/Demangling/Punycode.cpp"
12+
"${SWIFT_SOURCE_DIR}/lib/Demangling/Remangler.cpp"
813

914
C_COMPILE_FLAGS ${SWIFT_RUNTIME_CXX_FLAGS}
1015
LINK_FLAGS ${SWIFT_RUNTIME_LINK_FLAGS}

stdlib/public/Reflection/Demangle.cpp

Lines changed: 0 additions & 18 deletions
This file was deleted.

stdlib/public/Reflection/Remangle.cpp

Lines changed: 0 additions & 13 deletions
This file was deleted.

stdlib/public/runtime/CMakeLists.txt

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ set(swift_runtime_objc_sources
2727
ErrorObject.mm
2828
SwiftObject.mm
2929
SwiftValue.mm
30-
Remangle.cpp
31-
Reflection.mm)
30+
Reflection.mm
31+
"${SWIFT_SOURCE_DIR}/lib/Demangling/Remangler.cpp")
3232

3333
set(swift_runtime_sources
3434
AnyHashableSupport.cpp
@@ -54,11 +54,16 @@ set(swift_runtime_sources
5454
Portability.cpp
5555
ProtocolConformance.cpp
5656
RefCount.cpp
57-
RuntimeEntrySymbols.cpp)
57+
RuntimeEntrySymbols.cpp
58+
"${SWIFT_SOURCE_DIR}/lib/Demangling/OldDemangler.cpp"
59+
"${SWIFT_SOURCE_DIR}/lib/Demangling/Demangler.cpp"
60+
"${SWIFT_SOURCE_DIR}/lib/Demangling/NodePrinter.cpp"
61+
"${SWIFT_SOURCE_DIR}/lib/Demangling/Context.cpp"
62+
"${SWIFT_SOURCE_DIR}/lib/Demangling/ManglingUtils.cpp"
63+
"${SWIFT_SOURCE_DIR}/lib/Demangling/Punycode.cpp")
5864

5965
# Acknowledge that the following sources are known.
6066
set(LLVM_OPTIONAL_SOURCES
61-
Remangle.cpp
6267
swift_sections.S
6368
MutexPThread.cpp
6469
MutexWin32.cpp

stdlib/public/runtime/Demangle.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,18 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13-
#include "../../../lib/Demangling/OldDemangler.cpp"
14-
#include "../../../lib/Demangling/Demangler.cpp"
15-
#include "../../../lib/Demangling/NodePrinter.cpp"
16-
#include "../../../lib/Demangling/Context.cpp"
17-
#include "../../../lib/Demangling/ManglingUtils.cpp"
18-
#include "../../../lib/Demangling/Punycode.cpp"
1913
#include "swift/Runtime/Metadata.h"
14+
#include "swift/Strings.h"
2015
#include "Private.h"
2116

17+
#include <vector>
18+
2219
#if SWIFT_OBJC_INTEROP
2320
#include <objc/runtime.h>
2421
#endif
2522

23+
using namespace swift;
24+
2625
// FIXME: This stuff should be merged with the existing logic in
2726
// include/swift/Reflection/TypeRefBuilder.h as part of the rewrite
2827
// to change stdlib reflection over to using remote mirrors.

stdlib/public/runtime/Private.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#ifndef SWIFT_RUNTIME_PRIVATE_H
1818
#define SWIFT_RUNTIME_PRIVATE_H
1919

20-
#include "swift/Demangling/Demangle.h"
20+
#include "swift/Demangling/Demangler.h"
2121
#include "swift/Runtime/Config.h"
2222
#include "swift/Runtime/Metadata.h"
2323
#include "llvm/Support/Compiler.h"

stdlib/public/runtime/Remangle.cpp

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)