diff options
author | Erik Pilkington <erik.pilkington@gmail.com> | 2019-01-17 20:37:51 +0000 |
---|---|---|
committer | Erik Pilkington <erik.pilkington@gmail.com> | 2019-01-17 20:37:51 +0000 |
commit | 5094e5ef8bd40b30efc22825b7413de180114946 (patch) | |
tree | 28a10b39c2f2daf3c844c58b793ec78eef3fdc57 /llvm/lib/Demangle | |
parent | b60de17b5106cd28614baafbfdec2bae9a706fc0 (diff) | |
download | bcm5719-llvm-5094e5ef8bd40b30efc22825b7413de180114946.tar.gz bcm5719-llvm-5094e5ef8bd40b30efc22825b7413de180114946.zip |
NFC: Make the copies of the demangler byte-for-byte identical
With this patch, the copies of the files ItaniumDemangle.h,
StringView.h, and Utility.h are kept byte-for-byte in sync between
libcxxabi and llvm. All differences (namespaces, fallthrough, and
unreachable macros) are defined in each copies' DemanglerConfig.h.
This patch also adds a script to copy changes from libcxxabi
(cp-to-llvm.sh), and a README.txt explaining the situation.
Differential revision: https://reviews.llvm.org/D53538
llvm-svn: 351474
Diffstat (limited to 'llvm/lib/Demangle')
-rw-r--r-- | llvm/lib/Demangle/MicrosoftDemangle.cpp | 20 | ||||
-rw-r--r-- | llvm/lib/Demangle/MicrosoftDemangleNodes.cpp | 2 |
2 files changed, 11 insertions, 11 deletions
diff --git a/llvm/lib/Demangle/MicrosoftDemangle.cpp b/llvm/lib/Demangle/MicrosoftDemangle.cpp index 51ffa0bff7f..9db2f91b5e1 100644 --- a/llvm/lib/Demangle/MicrosoftDemangle.cpp +++ b/llvm/lib/Demangle/MicrosoftDemangle.cpp @@ -18,7 +18,7 @@ #include "llvm/Demangle/Demangle.h" #include "llvm/Demangle/MicrosoftDemangleNodes.h" -#include "llvm/Demangle/Compiler.h" +#include "llvm/Demangle/DemangleConfig.h" #include "llvm/Demangle/StringView.h" #include "llvm/Demangle/Utility.h" @@ -265,7 +265,7 @@ Demangler::demangleSpecialTableSymbolNode(StringView &MangledName, NI->Name = "`RTTI Complete Object Locator'"; break; default: - LLVM_BUILTIN_UNREACHABLE; + DEMANGLE_UNREACHABLE; } QualifiedNameNode *QN = demangleNameScopeChain(MangledName, NI); SpecialTableSymbolNode *STSN = Arena.alloc<SpecialTableSymbolNode>(); @@ -632,7 +632,7 @@ translateIntrinsicFunctionCode(char CH, FunctionIdentifierCodeGroup Group) { case FunctionIdentifierCodeGroup::DoubleUnder: return DoubleUnder[Index]; } - LLVM_BUILTIN_UNREACHABLE; + DEMANGLE_UNREACHABLE; } IdentifierNode * @@ -1188,7 +1188,7 @@ Demangler::demangleStringLiteral(StringView &MangledName) { switch (MangledName.popFront()) { case '1': IsWcharT = true; - LLVM_FALLTHROUGH; + DEMANGLE_FALLTHROUGH; case '0': break; default: @@ -1255,7 +1255,7 @@ Demangler::demangleStringLiteral(StringView &MangledName) { Result->Char = CharKind::Char32; break; default: - LLVM_BUILTIN_UNREACHABLE; + DEMANGLE_UNREACHABLE; } const unsigned NumChars = BytesDecoded / CharBytes; for (unsigned CharIndex = 0; CharIndex < NumChars; ++CharIndex) { @@ -2083,15 +2083,15 @@ Demangler::demangleTemplateParameterList(StringView &MangledName) { case 'J': TPRN->ThunkOffsets[TPRN->ThunkOffsetCount++] = demangleSigned(MangledName); - LLVM_FALLTHROUGH; + DEMANGLE_FALLTHROUGH; case 'I': TPRN->ThunkOffsets[TPRN->ThunkOffsetCount++] = demangleSigned(MangledName); - LLVM_FALLTHROUGH; + DEMANGLE_FALLTHROUGH; case 'H': TPRN->ThunkOffsets[TPRN->ThunkOffsetCount++] = demangleSigned(MangledName); - LLVM_FALLTHROUGH; + DEMANGLE_FALLTHROUGH; case '1': break; default: @@ -2117,13 +2117,13 @@ Demangler::demangleTemplateParameterList(StringView &MangledName) { case 'G': TPRN->ThunkOffsets[TPRN->ThunkOffsetCount++] = demangleSigned(MangledName); - LLVM_FALLTHROUGH; + DEMANGLE_FALLTHROUGH; case 'F': TPRN->ThunkOffsets[TPRN->ThunkOffsetCount++] = demangleSigned(MangledName); TPRN->ThunkOffsets[TPRN->ThunkOffsetCount++] = demangleSigned(MangledName); - LLVM_FALLTHROUGH; + DEMANGLE_FALLTHROUGH; case '0': break; default: diff --git a/llvm/lib/Demangle/MicrosoftDemangleNodes.cpp b/llvm/lib/Demangle/MicrosoftDemangleNodes.cpp index 622f8e75e35..e94d23783e1 100644 --- a/llvm/lib/Demangle/MicrosoftDemangleNodes.cpp +++ b/llvm/lib/Demangle/MicrosoftDemangleNodes.cpp @@ -12,7 +12,7 @@ //===----------------------------------------------------------------------===// #include "llvm/Demangle/MicrosoftDemangleNodes.h" -#include "llvm/Demangle/Compiler.h" +#include "llvm/Demangle/DemangleConfig.h" #include "llvm/Demangle/Utility.h" #include <cctype> #include <string> |