diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2017-07-30 04:08:23 +0000 |
---|---|---|
committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2017-07-30 04:08:23 +0000 |
commit | c9220039218e2c0ea4a2774a43bbc9088cc1b983 (patch) | |
tree | 3ea4db962bec13b2bd75d379efcd9bd5e9acfeb4 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | e5adb68e044da6733e9ebba7aea913c1ca9618dd (diff) | |
download | bcm5719-llvm-c9220039218e2c0ea4a2774a43bbc9088cc1b983.tar.gz bcm5719-llvm-c9220039218e2c0ea4a2774a43bbc9088cc1b983.zip |
CodeGenModule.cpp: [PR33810][Modules] Make sure actual memory corruption before random crash with -fmodules.
llvm-svn: 309499
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index d616486f17d..63d5ff3bee2 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -745,6 +745,8 @@ StringRef CodeGenModule::getMangledName(GlobalDecl GD) { // Keep the first result in the case of a mangling collision. auto Result = Manglings.insert(std::make_pair(Str, GD)); + assert(&FoundStr == &MangledDeclNames[CanonicalGD] && "FoundStr is invalidated!"); + assert(FoundStr.empty() && "FoundStr is not empty!"); return FoundStr = Result.first->first(); } |