Skip to content

Commit 9722152

Browse files
authored
Merge pull request #42029 from al45tair/eng/PR-90839754
[Demangler] Add a couple of functions back to the minimal build.
2 parents 2392de1 + e857862 commit 9722152

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

lib/Demangling/NodePrinter.cpp

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

17-
#if SWIFT_STDLIB_HAS_TYPE_PRINTING
18-
1917
#include "swift/Basic/STLExtras.h"
2018
#include "swift/Demangling/Demangle.h"
2119
#include "swift/AST/Ownership.h"
@@ -28,12 +26,6 @@ using namespace swift;
2826
using namespace Demangle;
2927
using llvm::StringRef;
3028

31-
[[noreturn]]
32-
static void printer_unreachable(const char *Message) {
33-
fprintf(stderr, "fatal error: %s\n", Message);
34-
std::abort();
35-
}
36-
3729
DemanglerPrinter &DemanglerPrinter::operator<<(unsigned long long n) & {
3830
char buffer[32];
3931
snprintf(buffer, sizeof(buffer), "%llu", n);
@@ -53,6 +45,14 @@ DemanglerPrinter &DemanglerPrinter::operator<<(long long n) & {
5345
return *this;
5446
}
5547

48+
#if SWIFT_STDLIB_HAS_TYPE_PRINTING
49+
50+
[[noreturn]]
51+
static void printer_unreachable(const char *Message) {
52+
fprintf(stderr, "fatal error: %s\n", Message);
53+
std::abort();
54+
}
55+
5656
std::string Demangle::genericParameterName(uint64_t depth, uint64_t index) {
5757
DemanglerPrinter name;
5858
do {

0 commit comments

Comments
 (0)