Skip to content

Commit 3db4630

Browse files
authored
Merge pull request #8013 from eeckstein/demangler-cmake
libraries: instead of including all demangler sources into a single C++ source file,
2 parents dc16a94 + b398098 commit 3db4630

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
@@ -32,8 +32,8 @@ set(swift_runtime_objc_sources
3232
ErrorObject.mm
3333
SwiftObject.mm
3434
SwiftValue.mm
35-
Remangle.cpp
36-
Reflection.mm)
35+
Reflection.mm
36+
"${SWIFT_SOURCE_DIR}/lib/Demangling/Remangler.cpp")
3737

3838
set(swift_runtime_sources
3939
AnyHashableSupport.cpp
@@ -59,11 +59,16 @@ set(swift_runtime_sources
5959
Portability.cpp
6060
ProtocolConformance.cpp
6161
RefCount.cpp
62-
RuntimeEntrySymbols.cpp)
62+
RuntimeEntrySymbols.cpp
63+
"${SWIFT_SOURCE_DIR}/lib/Demangling/OldDemangler.cpp"
64+
"${SWIFT_SOURCE_DIR}/lib/Demangling/Demangler.cpp"
65+
"${SWIFT_SOURCE_DIR}/lib/Demangling/NodePrinter.cpp"
66+
"${SWIFT_SOURCE_DIR}/lib/Demangling/Context.cpp"
67+
"${SWIFT_SOURCE_DIR}/lib/Demangling/ManglingUtils.cpp"
68+
"${SWIFT_SOURCE_DIR}/lib/Demangling/Punycode.cpp")
6369

6470
# Acknowledge that the following sources are known.
6571
set(LLVM_OPTIONAL_SOURCES
66-
Remangle.cpp
6772
swift_sections.S
6873
MutexPThread.cpp
6974
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)