Skip to content

[cxx-interop][nfc] Remove internal header dependency on swift shims. #39911

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions include/swift/Demangling/Demangle.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
#define SWIFT_DEMANGLING_DEMANGLE_H

#include "swift/Demangling/NamespaceMacros.h"
#include "swift/Runtime/Config.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Compiler.h"
#include <cassert>
#include <cstdint>
#include <memory>
Expand Down Expand Up @@ -514,7 +514,7 @@ enum class OperatorKind {
};

/// A mangling error, which consists of an error code and a Node pointer
struct SWIFT_NODISCARD ManglingError {
struct LLVM_NODISCARD ManglingError {
enum Code {
Success = 0,
AssertionFailed,
Expand Down Expand Up @@ -556,7 +556,7 @@ struct SWIFT_NODISCARD ManglingError {

/// Used as a return type for mangling functions that may fail
template <typename T>
class SWIFT_NODISCARD ManglingErrorOr {
class LLVM_NODISCARD ManglingErrorOr {
private:
ManglingError err_;
T value_;
Expand Down
3 changes: 2 additions & 1 deletion lib/Demangling/Demangler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
//
//===----------------------------------------------------------------------===//

#include "llvm/Support/Compiler.h"
#include "swift/Demangling/Demangler.h"
#include "DemanglerAssert.h"
#include "swift/Demangling/ManglingMacros.h"
Expand Down Expand Up @@ -90,7 +91,7 @@ static bool isRequirement(Node::Kind kind) {
// Public utility functions //
//////////////////////////////////

SWIFT_NORETURN void swift::Demangle::failAssert(const char *file, unsigned line,
LLVM_NODISCARD void swift::Demangle::failAssert(const char *file, unsigned line,
NodePointer node,
const char *expr) {
fprintf(stderr, "%s:%u: assertion failed for Node %p: %s", file, line, node,
Expand Down
3 changes: 2 additions & 1 deletion lib/Demangling/DemanglerAssert.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#ifndef SWIFT_DEMANGLING_ASSERT_H
#define SWIFT_DEMANGLING_ASSERT_H

#include "llvm/Support/Compiler.h"
#include "swift/Demangling/Demangle.h"
#include "swift/Demangling/NamespaceMacros.h"

Expand Down Expand Up @@ -50,7 +51,7 @@ namespace swift {
namespace Demangle {
SWIFT_BEGIN_INLINE_NAMESPACE

SWIFT_NORETURN void failAssert(const char *file, unsigned line,
LLVM_NODISCARD void failAssert(const char *file, unsigned line,
NodePointer node, const char *expr);

SWIFT_END_INLINE_NAMESPACE
Expand Down