Skip to content

Commit 5206ce5

Browse files
committed
[lldb] Fix compile error due implicit StringRef -> std::string conversion
This was failing with: ``` lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp:1276:24: error: no viable overloaded '=' module->APINotesFile = apinotes; ~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~ include/c++/v1/string:877:19: note: candidate function not viable: no known conversion from 'llvm::StringRef' to 'const std::__1::basic_string<char>' for 1st argument basic_string& operator=(const basic_string& __str); ^ ```
1 parent 3aee2ef commit 5206ce5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1273,7 +1273,7 @@ OptionalClangModuleID TypeSystemClang::GetOrCreateClangModule(
12731273
if (!created)
12741274
return ast_source->GetIDForModule(module);
12751275

1276-
module->APINotesFile = apinotes;
1276+
module->APINotesFile = std::string(apinotes);
12771277
return ast_source->RegisterModule(module);
12781278
}
12791279

0 commit comments

Comments
 (0)