2
0

[HIPIFY] Fix build failure against ToT trunk LLVM 11.0.0

+ Add an explicit cast when assigning StringRef to std::string
Este cometimento está contido em:
Evgeny Mankov
2020-02-01 14:41:16 +03:00
ascendente cb632005bc
cometimento c396b5b6e5
3 ficheiros modificados com 4 adições e 4 eliminações
+2 -2
Ver ficheiro
@@ -213,7 +213,7 @@ StringRef readSourceText(clang::SourceManager &SM, const clang::SourceRange &exp
*/
std::string stringifyZeroDefaultedArg(clang::SourceManager &SM, const clang::Expr *arg) {
if (clang::isa<clang::CXXDefaultArgExpr>(arg)) return "0";
else return readSourceText(SM, arg->getSourceRange());
else return std::string(readSourceText(SM, arg->getSourceRange()));
}
} // anonymous namespace
@@ -427,7 +427,7 @@ bool HipifyAction::cudaSharedIncompleteArrayVar(const mat::MatchFinder::MatchRes
clang::LangOptions LO;
LO.CUDA = true;
clang::PrintingPolicy policy(LO);
typeName = BT->getName(policy);
typeName = std::string(BT->getName(policy));
}
} else {
typeName = QT.getAsString();