pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/creduce Update creduce to 2.7.0 and apply some a...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f75544b9c066
branches:  trunk
changeset: 378111:f75544b9c066
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Sat Mar 31 20:09:10 2018 +0000

description:
Update creduce to 2.7.0 and apply some additional clang interface
changes.

diffstat:

 devel/creduce/Makefile                                              |   5 +-
 devel/creduce/distinfo                                              |  22 +-
 devel/creduce/patches/patch-clang__delta_EmptyStructToInt.cpp       |  13 -
 devel/creduce/patches/patch-clang__delta_Makefile.am                |  10 +-
 devel/creduce/patches/patch-clang__delta_Makefile.in                |  10 +-
 devel/creduce/patches/patch-clang__delta_RemoveBaseClass.cpp        |  22 ---
 devel/creduce/patches/patch-clang__delta_RemoveUnusedOuterClass.cpp |  13 -
 devel/creduce/patches/patch-clang__delta_RewriteUtils.cpp           |  22 ---
 devel/creduce/patches/patch-clang__delta_SimplifyNestedClass.cpp    |  13 -
 devel/creduce/patches/patch-clang__delta_SimplifyStruct.cpp         |  13 -
 devel/creduce/patches/patch-clang__delta_TransformationManager.cpp  |  73 +++------
 11 files changed, 50 insertions(+), 166 deletions(-)

diffs (296 lines):

diff -r d5561c044eaf -r f75544b9c066 devel/creduce/Makefile
--- a/devel/creduce/Makefile    Sat Mar 31 20:08:11 2018 +0000
+++ b/devel/creduce/Makefile    Sat Mar 31 20:09:10 2018 +0000
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.4 2017/05/03 08:38:40 jperkin Exp $
+# $NetBSD: Makefile,v 1.5 2018/03/31 20:09:10 joerg Exp $
 
-DISTNAME=      creduce-2.5.0
-PKGREVISION=   1
+DISTNAME=      creduce-2.7.0
 CATEGORIES=    devel
 MASTER_SITES=  https://embed.cs.utah.edu/creduce/
 
diff -r d5561c044eaf -r f75544b9c066 devel/creduce/distinfo
--- a/devel/creduce/distinfo    Sat Mar 31 20:08:11 2018 +0000
+++ b/devel/creduce/distinfo    Sat Mar 31 20:09:10 2018 +0000
@@ -1,15 +1,9 @@
-$NetBSD: distinfo,v 1.3 2016/11/20 22:14:07 joerg Exp $
+$NetBSD: distinfo,v 1.4 2018/03/31 20:09:10 joerg Exp $
 
-SHA1 (creduce-2.5.0.tar.gz) = 3b0400bf9163ff707d9a046b501b75a233f73533
-RMD160 (creduce-2.5.0.tar.gz) = c7166d53c8e57455fabcdbbab82304de7395e05b
-SHA512 (creduce-2.5.0.tar.gz) = 5292381ddf5e2b061bcfb1a3f52cd25cab3ab5985faade7c779c41be19b5cf7309fbcfff1428f026bfcee5da7c6f898b0b8fa48d03ef83acd64000c3ece2189d
-Size (creduce-2.5.0.tar.gz) = 742516 bytes
-SHA1 (patch-clang__delta_EmptyStructToInt.cpp) = eec767e9180572cf3dd038e0f1dfd6ccdc172d3e
-SHA1 (patch-clang__delta_Makefile.am) = f8c9201b12b07ff6499f40bba49c37ac1ee67739
-SHA1 (patch-clang__delta_Makefile.in) = 49b005fe89225f785bbe41fb5e0b4a3027121a79
-SHA1 (patch-clang__delta_RemoveBaseClass.cpp) = 1f075a0c271620d9130880afc4f8f774b10a3e8e
-SHA1 (patch-clang__delta_RemoveUnusedOuterClass.cpp) = 647a8950b650c6d786b2ef777716b5bf53e042e2
-SHA1 (patch-clang__delta_RewriteUtils.cpp) = 9ad7111dcf422eed58c7ebc676060e468057c373
-SHA1 (patch-clang__delta_SimplifyNestedClass.cpp) = 1859b62daf06c15f7e5571ecf6caecd4d64f2ab7
-SHA1 (patch-clang__delta_SimplifyStruct.cpp) = 5447d61fef8e95cabb8e735e1b80487bbb866f24
-SHA1 (patch-clang__delta_TransformationManager.cpp) = a280d1eebeb21ea51ec38565230b700a87a66553
+SHA1 (creduce-2.7.0.tar.gz) = 45f473364f5e98b612e4244be648ce2cc45dd178
+RMD160 (creduce-2.7.0.tar.gz) = 8c4cf6231983bf22790bab0a0cf5443924673ca3
+SHA512 (creduce-2.7.0.tar.gz) = 0ded47fdb4303d84619d63fbedd7bc12141b4857679dda8438683199dbdc98b985f848e797b9dc25a31dda591ee54bcb94580285890b23495fcf151aa3636226
+Size (creduce-2.7.0.tar.gz) = 768832 bytes
+SHA1 (patch-clang__delta_Makefile.am) = 6eac9443bb954c9fb54a922d6da909cf0a45d25d
+SHA1 (patch-clang__delta_Makefile.in) = c650aab0534268a67615d9360934534ea1d36b90
+SHA1 (patch-clang__delta_TransformationManager.cpp) = e1fd91a3d473300c10f23d8974fc1a0828cc9e18
diff -r d5561c044eaf -r f75544b9c066 devel/creduce/patches/patch-clang__delta_EmptyStructToInt.cpp
--- a/devel/creduce/patches/patch-clang__delta_EmptyStructToInt.cpp     Sat Mar 31 20:08:11 2018 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-$NetBSD: patch-clang__delta_EmptyStructToInt.cpp,v 1.1 2016/11/18 18:20:05 joerg Exp $
-
---- clang_delta/EmptyStructToInt.cpp.orig      2016-11-17 01:42:53.000000000 +0000
-+++ clang_delta/EmptyStructToInt.cpp
-@@ -351,7 +351,7 @@ void EmptyStructToInt::removeRecordDecls
-     if (SemiLoc.isInvalid()) {
-       if (!RD->isThisDeclarationADefinition())
-         return;
--      SourceLocation RBLoc = RD->getRBraceLoc();
-+      SourceLocation RBLoc = RD->getBraceRange().getEnd();
-       if (RBLoc.isInvalid())
-         return;
-       RewriteHelper->removeTextFromLeftAt(SourceRange(RBLoc, RBLoc),
diff -r d5561c044eaf -r f75544b9c066 devel/creduce/patches/patch-clang__delta_Makefile.am
--- a/devel/creduce/patches/patch-clang__delta_Makefile.am      Sat Mar 31 20:08:11 2018 +0000
+++ b/devel/creduce/patches/patch-clang__delta_Makefile.am      Sat Mar 31 20:09:10 2018 +0000
@@ -1,8 +1,8 @@
-$NetBSD: patch-clang__delta_Makefile.am,v 1.1 2016/11/02 00:15:43 joerg Exp $
+$NetBSD: patch-clang__delta_Makefile.am,v 1.2 2018/03/31 20:09:10 joerg Exp $
 
---- clang_delta/Makefile.am.orig       2016-11-01 21:32:26.772471037 +0000
+--- clang_delta/Makefile.am.orig       2017-05-18 16:42:08.000000000 +0000
 +++ clang_delta/Makefile.am
-@@ -93,8 +93,6 @@ clang_delta_CXXFLAGS = \
+@@ -107,12 +107,9 @@ clang_delta_CXXFLAGS = \
  # libraries.  So probably, we could move `LLVMLDFLAGS' back to the definition
  # of `clang_delta_LDFLAGS'.  I'll do that later.
  clang_delta_LDADD = \
@@ -11,3 +11,7 @@
        -lclangFrontendTool -lclangFrontend -lclangDriver -lclangSerialization \
        -lclangCodeGen -lclangParse -lclangSema -lclangAnalysis \
        -lclangRewriteFrontend -lclangRewrite -lclangAST -lclangBasic -lclangEdit -lclangLex \
+-      -lclangARCMigrate \
+       $(LLVMLIBS) \
+       $(CLANG_LDFLAGS) \
+       $(LLVMLDFLAGS)
diff -r d5561c044eaf -r f75544b9c066 devel/creduce/patches/patch-clang__delta_Makefile.in
--- a/devel/creduce/patches/patch-clang__delta_Makefile.in      Sat Mar 31 20:08:11 2018 +0000
+++ b/devel/creduce/patches/patch-clang__delta_Makefile.in      Sat Mar 31 20:09:10 2018 +0000
@@ -1,8 +1,8 @@
-$NetBSD: patch-clang__delta_Makefile.in,v 1.1 2016/11/02 00:15:43 joerg Exp $
+$NetBSD: patch-clang__delta_Makefile.in,v 1.2 2018/03/31 20:09:10 joerg Exp $
 
---- clang_delta/Makefile.in.orig       2016-11-01 21:32:43.204473218 +0000
+--- clang_delta/Makefile.in.orig       2017-05-18 16:42:08.000000000 +0000
 +++ clang_delta/Makefile.in
-@@ -488,8 +488,6 @@ clang_delta_CXXFLAGS = \
+@@ -502,12 +502,9 @@ clang_delta_CXXFLAGS = \
  # libraries.  So probably, we could move `LLVMLDFLAGS' back to the definition
  # of `clang_delta_LDFLAGS'.  I'll do that later.
  clang_delta_LDADD = \
@@ -11,3 +11,7 @@
        -lclangFrontendTool -lclangFrontend -lclangDriver -lclangSerialization \
        -lclangCodeGen -lclangParse -lclangSema -lclangAnalysis \
        -lclangRewriteFrontend -lclangRewrite -lclangAST -lclangBasic -lclangEdit -lclangLex \
+-      -lclangARCMigrate \
+       $(LLVMLIBS) \
+       $(CLANG_LDFLAGS) \
+       $(LLVMLDFLAGS)
diff -r d5561c044eaf -r f75544b9c066 devel/creduce/patches/patch-clang__delta_RemoveBaseClass.cpp
--- a/devel/creduce/patches/patch-clang__delta_RemoveBaseClass.cpp      Sat Mar 31 20:08:11 2018 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-$NetBSD: patch-clang__delta_RemoveBaseClass.cpp,v 1.1 2016/11/18 18:20:05 joerg Exp $
-
---- clang_delta/RemoveBaseClass.cpp.orig       2016-11-17 01:45:06.000000000 +0000
-+++ clang_delta/RemoveBaseClass.cpp
-@@ -209,7 +209,7 @@ void RemoveBaseClass::copyBaseClassDecls
-     return;
-   SourceLocation StartLoc = 
-     RewriteHelper->getLocationAfter(TheBaseClass->getLocation(), '{');
--  SourceLocation EndLoc = TheBaseClass->getRBraceLoc();
-+  SourceLocation EndLoc = TheBaseClass->getBraceRange().getEnd();
-   TransAssert(EndLoc.isValid() && "Invalid RBraceLoc!");
-   EndLoc = EndLoc.getLocWithOffset(-1);
- 
-@@ -217,7 +217,7 @@ void RemoveBaseClass::copyBaseClassDecls
-     TheRewriter.getRewrittenText(SourceRange(StartLoc, EndLoc));
- 
-   TransAssert(!DeclsStr.empty() && "Empty DeclsStr!");
--  SourceLocation InsertLoc = TheDerivedClass->getRBraceLoc();
-+  SourceLocation InsertLoc = TheDerivedClass->getBraceRange().getEnd();
-   TheRewriter.InsertTextBefore(InsertLoc, DeclsStr);
- }
- 
diff -r d5561c044eaf -r f75544b9c066 devel/creduce/patches/patch-clang__delta_RemoveUnusedOuterClass.cpp
--- a/devel/creduce/patches/patch-clang__delta_RemoveUnusedOuterClass.cpp       Sat Mar 31 20:08:11 2018 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-$NetBSD: patch-clang__delta_RemoveUnusedOuterClass.cpp,v 1.1 2016/11/18 18:20:05 joerg Exp $
-
---- clang_delta/RemoveUnusedOuterClass.cpp.orig        2016-11-17 01:53:49.000000000 +0000
-+++ clang_delta/RemoveUnusedOuterClass.cpp
-@@ -140,7 +140,7 @@ void RemoveUnusedOuterClass::removeOuter
-     TheRewriter.RemoveText(AS->getSourceRange());
-   }
-   
--  LocStart = TheCXXRDDef->getRBraceLoc();
-+  LocStart = TheCXXRDDef->getBraceRange().getEnd();
-   LocEnd = RewriteHelper->getLocationUntil(LocStart, ';');
-   if (LocStart.isInvalid() || LocEnd.isInvalid())
-     return;
diff -r d5561c044eaf -r f75544b9c066 devel/creduce/patches/patch-clang__delta_RewriteUtils.cpp
--- a/devel/creduce/patches/patch-clang__delta_RewriteUtils.cpp Sat Mar 31 20:08:11 2018 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-$NetBSD: patch-clang__delta_RewriteUtils.cpp,v 1.1 2016/11/18 18:20:05 joerg Exp $
-
---- clang_delta/RewriteUtils.cpp.orig  2016-11-17 01:55:03.000000000 +0000
-+++ clang_delta/RewriteUtils.cpp
-@@ -1701,7 +1701,7 @@ bool RewriteUtils::removeClassDecls(cons
-     SourceRange Range = (*I)->getSourceRange();
-     SourceLocation LocEnd;
-     if ((*I)->isThisDeclarationADefinition()) {
--      LocEnd = (*I)->getRBraceLoc();
-+      LocEnd = (*I)->getBraceRange().getEnd();
-       if (LocEnd.isValid())
-         LocEnd = getLocationUntil(LocEnd, ';');
-       else
-@@ -1726,7 +1726,7 @@ bool RewriteUtils::removeClassTemplateDe
-     SourceRange Range = (*I)->getSourceRange();
-     SourceLocation LocEnd;
-     if (CXXRD->isThisDeclarationADefinition()) {
--      LocEnd = CXXRD->getRBraceLoc();
-+      LocEnd = CXXRD->getBraceRange().getEnd();
-       LocEnd = getLocationUntil(LocEnd, ';');
-     }
-     else {
diff -r d5561c044eaf -r f75544b9c066 devel/creduce/patches/patch-clang__delta_SimplifyNestedClass.cpp
--- a/devel/creduce/patches/patch-clang__delta_SimplifyNestedClass.cpp  Sat Mar 31 20:08:11 2018 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-$NetBSD: patch-clang__delta_SimplifyNestedClass.cpp,v 1.1 2016/11/20 22:14:07 joerg Exp $
-
---- clang_delta/SimplifyNestedClass.cpp.orig   2016-11-19 11:31:59.000000000 +0000
-+++ clang_delta/SimplifyNestedClass.cpp
-@@ -140,7 +140,7 @@ void SimplifyNestedClass::removeOuterCla
-   LocEnd = LocEnd.getLocWithOffset(-1);
-   TheRewriter.RemoveText(SourceRange(LocStart, LocEnd));
- 
--  LocStart = TheBaseCXXRD->getRBraceLoc();
-+  LocStart = TheBaseCXXRD->getBraceRange().getEnd();
-   LocEnd = RewriteHelper->getLocationUntil(LocStart, ';');
-   if (LocStart.isInvalid() || LocEnd.isInvalid())
-     return;
diff -r d5561c044eaf -r f75544b9c066 devel/creduce/patches/patch-clang__delta_SimplifyStruct.cpp
--- a/devel/creduce/patches/patch-clang__delta_SimplifyStruct.cpp       Sat Mar 31 20:08:11 2018 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-$NetBSD: patch-clang__delta_SimplifyStruct.cpp,v 1.1 2016/11/18 18:20:05 joerg Exp $
-
---- clang_delta/SimplifyStruct.cpp.orig        2016-11-17 01:56:34.000000000 +0000
-+++ clang_delta/SimplifyStruct.cpp
-@@ -173,7 +173,7 @@ bool SimplifyStructRewriteVisitor::Visit
- 
-   SourceLocation LBLoc =
-     ConsumerInstance->RewriteHelper->getLocationUntil(RD->getLocation(), '{');
--  SourceLocation RBLoc = RD->getRBraceLoc();
-+  SourceLocation RBLoc = RD->getBraceRange().getEnd();
-   ConsumerInstance->TheRewriter.RemoveText(SourceRange(LBLoc, RBLoc));
-   return true;
- }
diff -r d5561c044eaf -r f75544b9c066 devel/creduce/patches/patch-clang__delta_TransformationManager.cpp
--- a/devel/creduce/patches/patch-clang__delta_TransformationManager.cpp        Sat Mar 31 20:08:11 2018 +0000
+++ b/devel/creduce/patches/patch-clang__delta_TransformationManager.cpp        Sat Mar 31 20:09:10 2018 +0000
@@ -1,60 +1,39 @@
-$NetBSD: patch-clang__delta_TransformationManager.cpp,v 1.1 2016/11/18 18:20:05 joerg Exp $
+$NetBSD: patch-clang__delta_TransformationManager.cpp,v 1.2 2018/03/31 20:09:10 joerg Exp $
 
---- clang_delta/TransformationManager.cpp.orig 2016-11-17 01:58:56.000000000 +0000
+--- clang_delta/TransformationManager.cpp.orig 2018-03-31 19:32:59.198705133 +0000
 +++ clang_delta/TransformationManager.cpp
-@@ -82,6 +82,16 @@ bool TransformationManager::initializeCo
- 
-   ClangInstance = new CompilerInstance();
-   assert(ClangInstance);
-+
-+  TargetOptions &TargetOpts = ClangInstance->getTargetOpts();
-+  PreprocessorOptions &PPOpts = ClangInstance->getPreprocessorOpts();
-+
-+  if (const char *env = getenv("CREDUCE_TARGET_TRIPLE")) {
-+    TargetOpts.Triple = std::string(env);
-+  } else {
-+    TargetOpts.Triple = LLVM_DEFAULT_TARGET_TRIPLE;
-+  }
-+  llvm::Triple Triple(TargetOpts.Triple);
-   
-   ClangInstance->createDiagnostics();
- 
-@@ -89,13 +99,13 @@ bool TransformationManager::initializeCo
-   InputKind IK = FrontendOptions::getInputKindForExtension(
-         StringRef(SrcFileName).rsplit('.').second);
-   if ((IK == IK_C) || (IK == IK_PreprocessedC)) {
--    Invocation.setLangDefaults(ClangInstance->getLangOpts(), IK_C);
-+    Invocation.setLangDefaults(ClangInstance->getLangOpts(), IK_C, Triple, PPOpts);
+@@ -99,18 +99,18 @@ bool TransformationManager::initializeCo
    }
-   else if ((IK == IK_CXX) || (IK == IK_PreprocessedCXX)) {
+   llvm::Triple T(TargetOpts.Triple);
+   CompilerInvocation &Invocation = ClangInstance->getInvocation();
+-  InputKind IK = FrontendOptions::getInputKindForExtension(
+-        StringRef(SrcFileName).rsplit('.').second);
+-  if ((IK == IK_C) || (IK == IK_PreprocessedC)) {
+-    Invocation.setLangDefaults(ClangInstance->getLangOpts(), IK_C, T, PPOpts);
++  InputKind::Language IK = FrontendOptions::getInputKindForExtension(
++        StringRef(SrcFileName).rsplit('.').second).getLanguage();
++  if (IK == InputKind::C) {
++    Invocation.setLangDefaults(ClangInstance->getLangOpts(), InputKind::C, T, PPOpts);
+   }
+-  else if ((IK == IK_CXX) || (IK == IK_PreprocessedCXX)) {
++  else if (IK == InputKind::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(), IK_CXX);
-+    Invocation.setLangDefaults(ClangInstance->getLangOpts(), IK_CXX, Triple, PPOpts);
+-    Invocation.setLangDefaults(ClangInstance->getLangOpts(), IK_CXX, T, PPOpts);
++    Invocation.setLangDefaults(ClangInstance->getLangOpts(), InputKind::CXX, T, PPOpts);
    }
-   else if(IK == IK_OpenCL) {
+-  else if(IK == IK_OpenCL) {
++  else if(IK == InputKind::OpenCL) {
      //Commandline parameters
-@@ -121,21 +131,13 @@ bool TransformationManager::initializeCo
-     CompilerInvocation::CreateFromArgs(Invocation,
+     std::vector<const char*> Args;
+     Args.push_back("-x");
+@@ -135,7 +135,7 @@ bool TransformationManager::initializeCo
                                         &Args[0], &Args[0] + Args.size(),
                                         ClangInstance->getDiagnostics());
--    Invocation.setLangDefaults(ClangInstance->getLangOpts(), IK_OpenCL);
-+    Invocation.setLangDefaults(ClangInstance->getLangOpts(), IK_OpenCL, Triple, PPOpts);
+     Invocation.setLangDefaults(ClangInstance->getLangOpts(),
+-                               IK_OpenCL, T, PPOpts);
++                               InputKind::OpenCL, T, PPOpts);
    }
    else {
      ErrorMsg = "Unsupported file type!";
-     return false;
-   }
- 
--  TargetOptions &TargetOpts = ClangInstance->getTargetOpts();
--
--  if (const char *env = getenv("CREDUCE_TARGET_TRIPLE")) {
--    TargetOpts.Triple = std::string(env);
--  } else {
--    TargetOpts.Triple = LLVM_DEFAULT_TARGET_TRIPLE;
--  }
--
-   TargetInfo *Target = 
-     TargetInfo::CreateTargetInfo(ClangInstance->getDiagnostics(),
-                                  ClangInstance->getInvocation().TargetOpts);



Home | Main Index | Thread Index | Old Index