Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/llvm/llvm-project.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2022-03-30 23:18:40 +0300
committerDavid Blaikie <dblaikie@gmail.com>2022-03-30 23:26:32 +0300
commit6f5ecd089f77e0da9af44bb7211ad1b11ea582d4 (patch)
treea4119e93b3bf49b8b0061f6ac4f4bfcab406349a /libcxxabi/src
parentc31af7cfe3b923b30d8929159366c670348fa5d3 (diff)
Demangle: Fix crash-on-invalid demangling of a module name with no underlying entity
Diffstat (limited to 'libcxxabi/src')
-rw-r--r--libcxxabi/src/demangle/ItaniumDemangle.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libcxxabi/src/demangle/ItaniumDemangle.h b/libcxxabi/src/demangle/ItaniumDemangle.h
index be2cf882bfc2..a434868ce1a5 100644
--- a/libcxxabi/src/demangle/ItaniumDemangle.h
+++ b/libcxxabi/src/demangle/ItaniumDemangle.h
@@ -2885,7 +2885,7 @@ Node *AbstractManglingParser<Derived, Alloc>::parseUnqualifiedName(
Result = getDerived().parseOperatorName(State);
}
- if (Module)
+ if (Result != nullptr && Module != nullptr)
Result = make<ModuleEntity>(Module, Result);
if (Result != nullptr)
Result = getDerived().parseAbiTags(Result);