Fix StringRef conversion for LLVM 11 (777180a32b61070a10dd330b4f038bf24e916af1) (#3305)

This commit is contained in:
Fangrui Song 2020-01-31 17:52:35 -08:00 committed by GitHub
parent 97e0d978ee
commit 0a007a55f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 31 additions and 28 deletions

View file

@ -196,7 +196,7 @@ DValue *DtoInlineIRExpr(Loc &loc, FuncDeclaration *fdecl,
std::unique_ptr<llvm::Module> m =
llvm::parseAssemblyString(stream.str().c_str(), err, gIR->context());
std::string errstr = err.getMessage();
std::string errstr(err.getMessage());
if (!errstr.empty()) {
error(tinst->loc,
"can't parse inline LLVM IR:\n`%s`\n%s\n%s\nThe input string "