diff options
author | Erich Keane <erich.keane@intel.com> | 2019-09-17 14:11:51 +0000 |
---|---|---|
committer | Erich Keane <erich.keane@intel.com> | 2019-09-17 14:11:51 +0000 |
commit | 68b0977e646abda3254a1eed123f75183b4aad3d (patch) | |
tree | d0f43c455b1c9565e4f69ed8010f2265ce2a9148 /clang/lib/AST/MicrosoftMangle.cpp | |
parent | 84a2f5e8b7874e111c7212008ec2fb6372a4a2c7 (diff) | |
download | bcm5719-llvm-68b0977e646abda3254a1eed123f75183b4aad3d.tar.gz bcm5719-llvm-68b0977e646abda3254a1eed123f75183b4aad3d.zip |
Add SpellingNotCalculated to Attribute Enums to suppress UBSan warnings
UBSan downstreams noticed that the assignment of SpellingNotCalculated
to the spellings caused warnings.
llvm-svn: 372124
Diffstat (limited to 'clang/lib/AST/MicrosoftMangle.cpp')
-rw-r--r-- | clang/lib/AST/MicrosoftMangle.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/AST/MicrosoftMangle.cpp b/clang/lib/AST/MicrosoftMangle.cpp index 7ad8b52f7fd..efa7f43cb45 100644 --- a/clang/lib/AST/MicrosoftMangle.cpp +++ b/clang/lib/AST/MicrosoftMangle.cpp @@ -615,6 +615,8 @@ void MicrosoftCXXNameMangler::mangleMemberDataPointer(const CXXRecordDecl *RD, case MSInheritanceAttr::Keyword_multiple_inheritance: Code = '0'; break; case MSInheritanceAttr::Keyword_virtual_inheritance: Code = 'F'; break; case MSInheritanceAttr::Keyword_unspecified_inheritance: Code = 'G'; break; + case MSInheritanceAttr::SpellingNotCalculated: + llvm_unreachable("not reachable"); } Out << '$' << Code; @@ -646,6 +648,8 @@ MicrosoftCXXNameMangler::mangleMemberFunctionPointer(const CXXRecordDecl *RD, case MSInheritanceAttr::Keyword_multiple_inheritance: Code = 'H'; break; case MSInheritanceAttr::Keyword_virtual_inheritance: Code = 'I'; break; case MSInheritanceAttr::Keyword_unspecified_inheritance: Code = 'J'; break; + case MSInheritanceAttr::SpellingNotCalculated: + llvm_unreachable("not reachable"); } // If non-virtual, mangle the name. If virtual, mangle as a virtual memptr |