Fix last commit

This commit is contained in:
Phillip Stephens 2021-11-23 21:31:24 -08:00
parent 644070d5f3
commit 066e3ae109
Signed by: Antidote
GPG Key ID: F8BEE4C83DACA60D
1 changed files with 6 additions and 4 deletions

View File

@ -190,10 +190,11 @@ class ATDNAEmitVisitor : public clang::RecursiveASTVisitor<ATDNAEmitVisitor> {
if (clang::AnnotateAttr* annot = clang::dyn_cast_or_null<clang::AnnotateAttr>(attr)) {
llvm::StringRef textRef = annot->getAnnotation();
#if LLVM_VERSION_MAJOR >= 13
if (textRef.startswith_insensitive("rcrc32=")) {
if (textRef.startswith_insensitive("rcrc32="))
#else
if (textRef.startswith_lower("rcrc32="))
#endif
{
unsigned long num = strtoul(textRef.data() + 7, nullptr, 16);
std::string tmpS;
llvm::raw_string_ostream s(tmpS);
@ -341,7 +342,7 @@ class ATDNAEmitVisitor : public clang::RecursiveASTVisitor<ATDNAEmitVisitor> {
#if LLVM_VERSION_MAJOR >= 13
arg.print(context.getPrintingPolicy(), OS, false);
#else
arg.print(context.getPrintingPolicy(), OS, false);
arg.print(context.getPrintingPolicy(), OS);
#endif
needsComma = true;
}
@ -359,10 +360,11 @@ class ATDNAEmitVisitor : public clang::RecursiveASTVisitor<ATDNAEmitVisitor> {
if (clang::AnnotateAttr* annot = clang::dyn_cast_or_null<clang::AnnotateAttr>(attr)) {
llvm::StringRef textRef = annot->getAnnotation();
#if LLVM_VERSION_MAJOR >= 13
if (textRef.startswith_insensitive("specparms=")) {
if (textRef.startswith_insensitive("specparms="))
#else
if (textRef.startswith_lower("specparms=")) {
if (textRef.startswith_lower("specparms="))
#endif
{
llvm::SmallVector<llvm::StringRef, 16> specParms;
textRef.substr(10).split(specParms, ',');
int numTuples = int(specParms.size()) / numParms;