Skip to content

Commit 2a1d7e5

Browse files
committed
[llvm] Fixed ItaniumDemangle.h compiled by MSVC
If the includes tree is big enough, `llvm::itanium_demangle::PointerType` may conflict with `llvm::PointerType` from other headers. This patch fixes the following [error](https://lab.llvm.org/buildbot/#/builders/141/builds/8206): ``` C:\lldb-aarch64-windows\llvm-project\llvm\include\llvm/Demangle/ItaniumDemangle.h(617,16): warning: unqualified friend declaration referring to type outside of the nearest enclosing namespace is a Microsoft extension; add a nested name specifier [-Wmicrosoft-unqualified-friend] 617 | friend class PointerType; | ^ | ::llvm:: C:\lldb-aarch64-windows\llvm-project\llvm\include\llvm/Demangle/ItaniumDemangle.h(667,24): error: 'Protocol' is a private member of 'llvm::itanium_demangle::ObjCProtoName' 667 | OB += objcProto->Protocol; | ^ C:\lldb-aarch64-windows\llvm-project\llvm\include\llvm/Demangle/ItaniumDemangle.h(615,20): note: implicitly declared private here 615 | std::string_view Protocol; ```
1 parent 9f7a587 commit 2a1d7e5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

llvm/include/llvm/Demangle/ItaniumDemangle.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -610,6 +610,8 @@ class EnableIfAttr : public Node {
610610
}
611611
};
612612

613+
class PointerType;
614+
613615
class ObjCProtoName : public Node {
614616
const Node *Ty;
615617
std::string_view Protocol;

0 commit comments

Comments
 (0)