Skip to content

Commit dd5dc10

Browse files
committed
fix test failures
1 parent 4b59cf6 commit dd5dc10

File tree

3 files changed

+24
-3
lines changed

3 files changed

+24
-3
lines changed

libcxxabi/src/demangle/ItaniumDemangle.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include "DemangleConfig.h"
2020
#include "StringViewExtras.h"
2121
#include "Utility.h"
22+
#include "Visibility.h"
2223
#include <algorithm>
2324
#include <cctype>
2425
#include <cstdint>
@@ -3049,7 +3050,8 @@ template <typename Derived, typename Alloc> struct AbstractManglingParser {
30493050
Node *parse(bool ParseParams = true);
30503051
};
30513052

3052-
const char* parse_discriminator(const char* first, const char* last);
3053+
DEMANGLE_ABI const char *parse_discriminator(const char *first,
3054+
const char *last);
30533055

30543056
// <name> ::= <nested-name> // N
30553057
// ::= <local-name> # See Scope Encoding below // Z

libcxxabi/src/demangle/Visibility.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
//===--- Visibility.h -------------------------------------------*- C++ -*-===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
// This file is contains noop definitions of the DEMANGLE_ABI macro defined in
8+
// llvm/include/llvm/Demangle/Visibility.h.
9+
//===----------------------------------------------------------------------===//
10+
11+
#ifndef LIBCXXABI_DEMANGLE_VISIBILITY_H
12+
#define LIBCXXABI_DEMANGLE_VISIBILITY_H
13+
14+
// The DEMANGLE_ABI macro resovles to nothing when building libcxxabi. Only
15+
// the llvm copy defines DEMANGLE_ABI as a visibility attribute.
16+
#define DEMANGLE_ABI
17+
18+
#endif

libcxxabi/src/demangle/cp-to-llvm.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
#!/bin/bash
22

3-
# Copies the 'demangle' library, excluding 'DemangleConfig.h', to llvm. If no
4-
# llvm directory is specified, then assume a monorepo layout.
3+
# Copies the 'demangle' library, excluding 'DemangleConfig.h' and
4+
# 'Visibility.h', to llvm. If no llvm directory is specified, then assume a
5+
# monorepo layout.
56

67
set -e
78

0 commit comments

Comments
 (0)