Skip to content

Commit df638c2

Browse files
authored
Add workaround for MSVC++ 2017 bug to ItaniumDemangle.h. (#2021)
This workaround is to avoid compilation error when building on Windows with MSVC++ 2017. Signed-off-by: Konstantin S Bobrovsky <konstantin.s.bobrovsky@intel.com>
1 parent 00e7308 commit df638c2

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

llvm/include/llvm/Demangle/ItaniumDemangle.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,14 @@ class EnableIfAttr : public Node {
445445
}
446446
};
447447

448+
#ifdef _MSC_VER
449+
// Workaround for MSVC++ bug (Version 2017, 15.8.9) - w/o this forward
450+
// declaration, the friend declaration in ObjCProtoName below has no effect
451+
// and leads to compilation error when ObjCProtoName::Protocol private field
452+
// is accessed in PointerType::printLeft.
453+
class PointerType;
454+
#endif // _MSC_VER
455+
448456
class ObjCProtoName : public Node {
449457
const Node *Ty;
450458
StringView Protocol;

0 commit comments

Comments
 (0)