Skip to content

Commit b19a2f0

Browse files
authored
Merge pull request #5393 from jrose-apple/StringRef-temporaries
2 parents bc3e242 + 26be936 commit b19a2f0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/IRGen/IRGenDebugInfo.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1479,6 +1479,7 @@ llvm::DIType *IRGenDebugInfo::createType(DebugTypeInfo DbgTy,
14791479

14801480
// Use "__ObjC" as default for implicit decls.
14811481
// FIXME: Do something more clever based on the decl's mangled name.
1482+
std::string FullModuleNameBuffer;
14821483
StringRef ModulePath;
14831484
StringRef ModuleName = "__ObjC";
14841485
if (auto *OwningModule = ClangDecl->getImportedOwningModule())
@@ -1488,7 +1489,8 @@ llvm::DIType *IRGenDebugInfo::createType(DebugTypeInfo DbgTy,
14881489
if (auto *ClangModule = SwiftModule->findUnderlyingClangModule()) {
14891490
// FIXME: Clang submodules are not handled here.
14901491
// FIXME: Clang module config macros are not handled here.
1491-
ModuleName = ClangModule->getFullModuleName();
1492+
FullModuleNameBuffer = ClangModule->getFullModuleName();
1493+
ModuleName = FullModuleNameBuffer;
14921494
// FIXME: A clang module's Directory is supposed to be the
14931495
// directory containing the module map, but ClangImporter
14941496
// sets it to the module cache directory.

0 commit comments

Comments
 (0)