Received: by mail.netbsd.org (Postfix, from userid 605) id 8C99C84D65; Wed, 14 Jul 2021 09:08:51 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id C4AE884CD9 for ; Wed, 14 Jul 2021 09:08:50 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id TT8JtlYzkt9P for ; Wed, 14 Jul 2021 09:08:49 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id 6E7C984CBC for ; Wed, 14 Jul 2021 09:08:49 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 6603CFA95; Wed, 14 Jul 2021 09:08:49 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_1626253729139860" MIME-Version: 1.0 Date: Wed, 14 Jul 2021 09:08:49 +0000 From: "Thomas Klausner" Subject: CVS commit: pkgsrc/devel/creduce To: pkgsrc-changes@NetBSD.org Reply-To: wiz@netbsd.org X-Mailer: log_accum Message-Id: <20210714090849.6603CFA95@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_1626253729139860 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: wiz Date: Wed Jul 14 09:08:49 UTC 2021 Modified Files: pkgsrc/devel/creduce: Makefile distinfo pkgsrc/devel/creduce/patches: patch-clang__delta_TransformationManager.cpp Added Files: pkgsrc/devel/creduce/patches: patch-clang__delta_CommonRenameClassRewriteVisitor.h patch-clang__delta_RemoveNamespace.cpp patch-clang__delta_RewriteUtils.cpp patch-clang__delta_Transformation.cpp Removed Files: pkgsrc/devel/creduce/patches: patch-clang__delta_Makefile.am patch-clang__delta_Makefile.in Log Message: creduce: fix build with llvm-12 From https://github.com/csmith-project/creduce/tree/llvm-12.0-dev To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 pkgsrc/devel/creduce/Makefile cvs rdiff -u -r1.8 -r1.9 pkgsrc/devel/creduce/distinfo cvs rdiff -u -r0 -r1.1 \ pkgsrc/devel/creduce/patches/patch-clang__delta_CommonRenameClassRewriteVisitor.h \ pkgsrc/devel/creduce/patches/patch-clang__delta_RemoveNamespace.cpp \ pkgsrc/devel/creduce/patches/patch-clang__delta_Transformation.cpp cvs rdiff -u -r1.2 -r0 \ pkgsrc/devel/creduce/patches/patch-clang__delta_Makefile.am \ pkgsrc/devel/creduce/patches/patch-clang__delta_Makefile.in cvs rdiff -u -r0 -r1.3 \ pkgsrc/devel/creduce/patches/patch-clang__delta_RewriteUtils.cpp cvs rdiff -u -r1.6 -r1.7 \ pkgsrc/devel/creduce/patches/patch-clang__delta_TransformationManager.cpp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_1626253729139860 Content-Disposition: inline Content-Length: 11941 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/devel/creduce/Makefile diff -u pkgsrc/devel/creduce/Makefile:1.16 pkgsrc/devel/creduce/Makefile:1.17 --- pkgsrc/devel/creduce/Makefile:1.16 Mon May 24 19:49:54 2021 +++ pkgsrc/devel/creduce/Makefile Wed Jul 14 09:08:48 2021 @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.16 2021/05/24 19:49:54 wiz Exp $ +# $NetBSD: Makefile,v 1.17 2021/07/14 09:08:48 wiz Exp $ DISTNAME= creduce-2.10.0 -PKGREVISION= 7 +PKGREVISION= 8 CATEGORIES= devel MASTER_SITES= https://embed.cs.utah.edu/creduce/ Index: pkgsrc/devel/creduce/distinfo diff -u pkgsrc/devel/creduce/distinfo:1.8 pkgsrc/devel/creduce/distinfo:1.9 --- pkgsrc/devel/creduce/distinfo:1.8 Mon Apr 20 16:33:51 2020 +++ pkgsrc/devel/creduce/distinfo Wed Jul 14 09:08:48 2021 @@ -1,9 +1,11 @@ -$NetBSD: distinfo,v 1.8 2020/04/20 16:33:51 adam Exp $ +$NetBSD: distinfo,v 1.9 2021/07/14 09:08:48 wiz Exp $ SHA1 (creduce-2.10.0.tar.gz) = 77c3dafb2446133ca2f2aeae34b2e4b79de5231d RMD160 (creduce-2.10.0.tar.gz) = 183be95aec282812724ec66204952ad33dbc923b SHA512 (creduce-2.10.0.tar.gz) = f2f2cc498cbf78331ea62e533579c84042ddc1ad8eb146adeae6b3a833e0ea4bb26a4ab5f1f61a30500a5a0c9c89cc1d4e4c8547aa9e4a14d3b5d744aeb4f6a7 Size (creduce-2.10.0.tar.gz) = 779318 bytes -SHA1 (patch-clang__delta_Makefile.am) = 6eac9443bb954c9fb54a922d6da909cf0a45d25d -SHA1 (patch-clang__delta_Makefile.in) = c650aab0534268a67615d9360934534ea1d36b90 -SHA1 (patch-clang__delta_TransformationManager.cpp) = 40171540ed976c14ec3a9d249e8e8ed96d3e8a88 +SHA1 (patch-clang__delta_CommonRenameClassRewriteVisitor.h) = 66527a9c3e0bf8ff778c9a57eb20cda596223300 +SHA1 (patch-clang__delta_RemoveNamespace.cpp) = 82eb6a625a27edfac93d5727c5dde7d1382d68bb +SHA1 (patch-clang__delta_RewriteUtils.cpp) = 56b8f4d19189019c4dcc83b315a1cfd2ff459955 +SHA1 (patch-clang__delta_Transformation.cpp) = b04a80569552639c529251dc450defefbd8f2e93 +SHA1 (patch-clang__delta_TransformationManager.cpp) = 322e64726dc0301832824caf228da6faf8bb6ae8 Index: pkgsrc/devel/creduce/patches/patch-clang__delta_TransformationManager.cpp diff -u pkgsrc/devel/creduce/patches/patch-clang__delta_TransformationManager.cpp:1.6 pkgsrc/devel/creduce/patches/patch-clang__delta_TransformationManager.cpp:1.7 --- pkgsrc/devel/creduce/patches/patch-clang__delta_TransformationManager.cpp:1.6 Mon Apr 20 16:33:51 2020 +++ pkgsrc/devel/creduce/patches/patch-clang__delta_TransformationManager.cpp Wed Jul 14 09:08:49 2021 @@ -1,46 +1,45 @@ -$NetBSD: patch-clang__delta_TransformationManager.cpp,v 1.6 2020/04/20 16:33:51 adam Exp $ +$NetBSD: patch-clang__delta_TransformationManager.cpp,v 1.7 2021/07/14 09:08:49 wiz Exp $ -Port to LLVM 10.0 -https://github.com/csmith-project/creduce/pull/204/ +Build fix for llvm 12.0.1 from https://github.com/csmith-project/creduce/tree/llvm-12.0-dev --- clang_delta/TransformationManager.cpp.orig 2019-05-13 21:17:30.000000000 +0000 +++ clang_delta/TransformationManager.cpp -@@ -16,6 +16,7 @@ +@@ -16,9 +16,12 @@ #include +#include "clang/Basic/Builtins.h" #include "clang/Basic/Diagnostic.h" ++#include "clang/Basic/FileManager.h" #include "clang/Basic/TargetInfo.h" #include "clang/Lex/Preprocessor.h" -@@ -101,6 +102,7 @@ bool TransformationManager::initializeCo ++#include "clang/Lex/PreprocessorOptions.h" + #include "clang/Frontend/CompilerInstance.h" + #include "clang/Parse/ParseAST.h" + +@@ -101,16 +104,16 @@ bool TransformationManager::initializeCo CompilerInvocation &Invocation = ClangInstance->getInvocation(); InputKind IK = FrontendOptions::getInputKindForExtension( StringRef(SrcFileName).rsplit('.').second); -+#if LLVM_VERSION_MAJOR < 10 - if (IK.getLanguage() == InputKind::C) { - Invocation.setLangDefaults(ClangInstance->getLangOpts(), InputKind::C, T, PPOpts); - } -@@ -111,6 +113,18 @@ bool TransformationManager::initializeCo - Invocation.setLangDefaults(ClangInstance->getLangOpts(), InputKind::CXX, T, PPOpts); - } - else if(IK.getLanguage() == InputKind::OpenCL) { -+#else +- if (IK.getLanguage() == InputKind::C) { +- Invocation.setLangDefaults(ClangInstance->getLangOpts(), InputKind::C, T, PPOpts); + if (IK.getLanguage() == Language::C) { -+ Invocation.setLangDefaults(ClangInstance->getLangOpts(), InputKind(Language::C), T, PPOpts); -+ } ++ Invocation.setLangDefaults(ClangInstance->getLangOpts(), Language::C, T, PPOpts.Includes); + } +- else if (IK.getLanguage() == InputKind::CXX) { + else if (IK.getLanguage() == Language::CXX) { -+ // ISSUE: it might cause some problems when building AST -+ // for a function which has a non-declared callee, e.g., -+ // It results an empty AST for the caller. -+ Invocation.setLangDefaults(ClangInstance->getLangOpts(), InputKind(Language::CXX), T, PPOpts); -+ } + // ISSUE: it might cause some problems when building AST + // for a function which has a non-declared callee, e.g., + // It results an empty AST for the caller. +- Invocation.setLangDefaults(ClangInstance->getLangOpts(), InputKind::CXX, T, PPOpts); ++ Invocation.setLangDefaults(ClangInstance->getLangOpts(), Language::CXX, T, PPOpts.Includes); + } +- else if(IK.getLanguage() == InputKind::OpenCL) { + else if(IK.getLanguage() == Language::OpenCL) { -+#endif //Commandline parameters std::vector Args; Args.push_back("-x"); -@@ -122,7 +136,7 @@ bool TransformationManager::initializeCo +@@ -122,7 +125,7 @@ bool TransformationManager::initializeCo ClangInstance->createFileManager(); if(CLCPath != NULL && ClangInstance->hasFileManager() && @@ -49,24 +48,16 @@ https://github.com/csmith-project/creduc Args.push_back("-I"); Args.push_back(CLCPath); } -@@ -132,10 +146,19 @@ bool TransformationManager::initializeCo +@@ -132,10 +135,10 @@ bool TransformationManager::initializeCo Args.push_back("-fno-builtin"); CompilerInvocation::CreateFromArgs(Invocation, -+#if LLVM_VERSION_MAJOR >= 10 -+ Args, -+#else - &Args[0], &Args[0] + Args.size(), -+#endif +- &Args[0], &Args[0] + Args.size(), ++ ArrayRef(&Args[0], &Args[0] + Args.size()), ClangInstance->getDiagnostics()); Invocation.setLangDefaults(ClangInstance->getLangOpts(), - InputKind::OpenCL, T, PPOpts); -+#if LLVM_VERSION_MAJOR >= 10 -+ InputKind(Language::OpenCL), -+#else -+ InputKind::OpenCL, -+#endif -+ T, PPOpts); ++ Language::OpenCL, T, PPOpts.Includes); } else { ErrorMsg = "Unsupported file type!"; Added files: Index: pkgsrc/devel/creduce/patches/patch-clang__delta_CommonRenameClassRewriteVisitor.h diff -u /dev/null pkgsrc/devel/creduce/patches/patch-clang__delta_CommonRenameClassRewriteVisitor.h:1.1 --- /dev/null Wed Jul 14 09:08:49 2021 +++ pkgsrc/devel/creduce/patches/patch-clang__delta_CommonRenameClassRewriteVisitor.h Wed Jul 14 09:08:49 2021 @@ -0,0 +1,24 @@ +$NetBSD: patch-clang__delta_CommonRenameClassRewriteVisitor.h,v 1.1 2021/07/14 09:08:49 wiz Exp $ + +Build fix for llvm 12.0.1 from https://github.com/csmith-project/creduce/tree/llvm-12.0-dev + +--- clang_delta/CommonRenameClassRewriteVisitor.h.orig 2019-05-13 21:17:30.000000000 +0000 ++++ clang_delta/CommonRenameClassRewriteVisitor.h +@@ -98,7 +98,7 @@ bool CommonRenameClassRewriteVisitor: + return true; + + IdentifierInfo *IdInfo = DeclName.getAsIdentifierInfo(); +- std::string IdName = IdInfo->getName(); ++ std::string IdName = IdInfo->getName().str(); + std::string Name; + if (getNewNameByName(IdName, Name)) { + SourceLocation LocStart = NameInfo.getBeginLoc(); +@@ -332,7 +332,7 @@ template bool CommonRenameCl + TransAssert(DTST && "Bad DependentTemplateSpecializationType!"); + + const IdentifierInfo *IdInfo = DTST->getIdentifier(); +- std::string IdName = IdInfo->getName(); ++ std::string IdName = IdInfo->getName().str(); + std::string Name; + if (getNewNameByName(IdName, Name)) { + SourceLocation LocStart = DTSLoc.getTemplateNameLoc(); Index: pkgsrc/devel/creduce/patches/patch-clang__delta_RemoveNamespace.cpp diff -u /dev/null pkgsrc/devel/creduce/patches/patch-clang__delta_RemoveNamespace.cpp:1.1 --- /dev/null Wed Jul 14 09:08:49 2021 +++ pkgsrc/devel/creduce/patches/patch-clang__delta_RemoveNamespace.cpp Wed Jul 14 09:08:49 2021 @@ -0,0 +1,15 @@ +$NetBSD: patch-clang__delta_RemoveNamespace.cpp,v 1.1 2021/07/14 09:08:49 wiz Exp $ + +Build fix for llvm 12.0.1 from https://github.com/csmith-project/creduce/tree/llvm-12.0-dev + +--- clang_delta/RemoveNamespace.cpp.orig 2019-05-13 21:17:30.000000000 +0000 ++++ clang_delta/RemoveNamespace.cpp +@@ -458,7 +458,7 @@ bool RemoveNamespaceRewriteVisitor::Visi + TransAssert(DTST && "Bad DependentTemplateSpecializationType!"); + + const IdentifierInfo *IdInfo = DTST->getIdentifier(); +- std::string IdName = IdInfo->getName(); ++ std::string IdName = IdInfo->getName().str(); + std::string Name; + + // FIXME: Index: pkgsrc/devel/creduce/patches/patch-clang__delta_Transformation.cpp diff -u /dev/null pkgsrc/devel/creduce/patches/patch-clang__delta_Transformation.cpp:1.1 --- /dev/null Wed Jul 14 09:08:49 2021 +++ pkgsrc/devel/creduce/patches/patch-clang__delta_Transformation.cpp Wed Jul 14 09:08:49 2021 @@ -0,0 +1,24 @@ +$NetBSD: patch-clang__delta_Transformation.cpp,v 1.1 2021/07/14 09:08:49 wiz Exp $ + +Build fix for llvm 12.0.1 from https://github.com/csmith-project/creduce/tree/llvm-12.0-dev + +--- clang_delta/Transformation.cpp.orig 2019-05-13 21:17:30.000000000 +0000 ++++ clang_delta/Transformation.cpp +@@ -106,7 +106,7 @@ void Transformation::outputTransformedSo + void Transformation::outputOriginalSource(llvm::raw_ostream &OutStream) + { + FileID MainFileID = SrcManager->getMainFileID(); +- const llvm::MemoryBuffer *MainBuf = SrcManager->getBuffer(MainFileID); ++ auto MainBuf = SrcManager->getBufferOrNone(MainFileID); + TransAssert(MainBuf && "Empty MainBuf!"); + OutStream << MainBuf->getBufferStart(); + OutStream.flush(); +@@ -357,7 +357,7 @@ unsigned int Transformation::getConstArr + llvm::SmallString<8> IntStr; + Result.toStringUnsigned(IntStr); + +- std::stringstream TmpSS(IntStr.str()); ++ std::stringstream TmpSS(IntStr.str().str()); + + if (!(TmpSS >> Sz)) { + TransAssert(0 && "Non-integer value!"); Index: pkgsrc/devel/creduce/patches/patch-clang__delta_RewriteUtils.cpp diff -u /dev/null pkgsrc/devel/creduce/patches/patch-clang__delta_RewriteUtils.cpp:1.3 --- /dev/null Wed Jul 14 09:08:49 2021 +++ pkgsrc/devel/creduce/patches/patch-clang__delta_RewriteUtils.cpp Wed Jul 14 09:08:49 2021 @@ -0,0 +1,26 @@ +$NetBSD: patch-clang__delta_RewriteUtils.cpp,v 1.3 2021/07/14 09:08:49 wiz Exp $ + +Build fix for llvm 12.0.1 from https://github.com/csmith-project/creduce/tree/llvm-12.0-dev + +--- clang_delta/RewriteUtils.cpp.orig 2019-05-13 21:17:30.000000000 +0000 ++++ clang_delta/RewriteUtils.cpp +@@ -718,8 +718,8 @@ std::string RewriteUtils::getStmtIndentS + StringRef MB = SrcManager->getBufferData(FID); + + unsigned lineNo = SrcManager->getLineNumber(FID, StartOffset) - 1; +- const SrcMgr::ContentCache * +- Content = SrcManager->getSLocEntry(FID).getFile().getContentCache(); ++ const SrcMgr::ContentCache *Content = ++ &SrcManager->getSLocEntry(FID).getFile().getContentCache(); + unsigned lineOffs = Content->SourceLineCache[lineNo]; + + // Find the whitespace at the start of the line. +@@ -730,7 +730,7 @@ std::string RewriteUtils::getStmtIndentS + ++I; + indentSpace = MB.substr(lineOffs, I-lineOffs); + +- return indentSpace; ++ return indentSpace.str(); + } + + bool RewriteUtils::addLocalVarToFunc(const std::string &VarStr, --_----------=_1626253729139860--