pkgsrc-Changes archive

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

CVS commit: pkgsrc/devel/creduce



Module Name:    pkgsrc
Committed By:   joerg
Date:           Fri Nov 18 18:20:05 UTC 2016

Modified Files:
        pkgsrc/devel/creduce: Makefile distinfo
Added Files:
        pkgsrc/devel/creduce/patches: patch-clang__delta_EmptyStructToInt.cpp
            patch-clang__delta_EmptyStructToInt.cpp.orig
            patch-clang__delta_RemoveBaseClass.cpp
            patch-clang__delta_RemoveBaseClass.cpp.orig
            patch-clang__delta_RemoveUnusedOuterClass.cpp
            patch-clang__delta_RemoveUnusedOuterClass.cpp.orig
            patch-clang__delta_RewriteUtils.cpp
            patch-clang__delta_RewriteUtils.cpp.orig
            patch-clang__delta_SimplifyStruct.cpp
            patch-clang__delta_SimplifyStruct.cpp.orig
            patch-clang__delta_TransformationManager.cpp
            patch-clang__delta_TransformationManager.cpp.orig

Log Message:
Fix for API changes in Clang 3.9.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 pkgsrc/devel/creduce/Makefile
cvs rdiff -u -r1.1 -r1.2 pkgsrc/devel/creduce/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/devel/creduce/patches/patch-clang__delta_EmptyStructToInt.cpp \
    pkgsrc/devel/creduce/patches/patch-clang__delta_EmptyStructToInt.cpp.orig \
    pkgsrc/devel/creduce/patches/patch-clang__delta_RemoveBaseClass.cpp \
    pkgsrc/devel/creduce/patches/patch-clang__delta_RemoveBaseClass.cpp.orig \
    pkgsrc/devel/creduce/patches/patch-clang__delta_RemoveUnusedOuterClass.cpp \
    pkgsrc/devel/creduce/patches/patch-clang__delta_RemoveUnusedOuterClass.cpp.orig \
    pkgsrc/devel/creduce/patches/patch-clang__delta_RewriteUtils.cpp \
    pkgsrc/devel/creduce/patches/patch-clang__delta_RewriteUtils.cpp.orig \
    pkgsrc/devel/creduce/patches/patch-clang__delta_SimplifyStruct.cpp \
    pkgsrc/devel/creduce/patches/patch-clang__delta_SimplifyStruct.cpp.orig \
    pkgsrc/devel/creduce/patches/patch-clang__delta_TransformationManager.cpp \
    pkgsrc/devel/creduce/patches/patch-clang__delta_TransformationManager.cpp.orig

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/devel/creduce/Makefile
diff -u pkgsrc/devel/creduce/Makefile:1.2 pkgsrc/devel/creduce/Makefile:1.3
--- pkgsrc/devel/creduce/Makefile:1.2   Mon Nov 14 20:56:10 2016
+++ pkgsrc/devel/creduce/Makefile       Fri Nov 18 18:20:05 2016
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2016/11/14 20:56:10 ryoon Exp $
+# $NetBSD: Makefile,v 1.3 2016/11/18 18:20:05 joerg Exp $
 
 DISTNAME=      creduce-2.5.0
 PKGREVISION=   1
@@ -22,6 +22,8 @@ DEPENDS+=     p5-Term-ReadKey-[0-9]*:../../d
 DEPENDS+=      p5-Sys-CPU-[0-9]*:../../sysutils/p5-Sys-CPU
 DEPENDS+=      p5-Regexp-Common-[0-9]*:../../textproc/p5-Regexp-Common
 
+TEST_TARGET=   check
+
 .include "../../mk/bsd.prefs.mk"
 
 CXXFLAGS+=     -std=c++11

Index: pkgsrc/devel/creduce/distinfo
diff -u pkgsrc/devel/creduce/distinfo:1.1 pkgsrc/devel/creduce/distinfo:1.2
--- pkgsrc/devel/creduce/distinfo:1.1   Wed Nov  2 00:15:43 2016
+++ pkgsrc/devel/creduce/distinfo       Fri Nov 18 18:20:05 2016
@@ -1,8 +1,14 @@
-$NetBSD: distinfo,v 1.1 2016/11/02 00:15:43 joerg Exp $
+$NetBSD: distinfo,v 1.2 2016/11/18 18:20:05 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_SimplifyStruct.cpp) = 5447d61fef8e95cabb8e735e1b80487bbb866f24
+SHA1 (patch-clang__delta_TransformationManager.cpp) = a280d1eebeb21ea51ec38565230b700a87a66553

Added files:

Index: pkgsrc/devel/creduce/patches/patch-clang__delta_EmptyStructToInt.cpp
diff -u /dev/null pkgsrc/devel/creduce/patches/patch-clang__delta_EmptyStructToInt.cpp:1.1
--- /dev/null   Fri Nov 18 18:20:05 2016
+++ pkgsrc/devel/creduce/patches/patch-clang__delta_EmptyStructToInt.cpp        Fri Nov 18 18:20:05 2016
@@ -0,0 +1,13 @@
+$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),
Index: pkgsrc/devel/creduce/patches/patch-clang__delta_RemoveBaseClass.cpp
diff -u /dev/null pkgsrc/devel/creduce/patches/patch-clang__delta_RemoveBaseClass.cpp:1.1
--- /dev/null   Fri Nov 18 18:20:05 2016
+++ pkgsrc/devel/creduce/patches/patch-clang__delta_RemoveBaseClass.cpp Fri Nov 18 18:20:05 2016
@@ -0,0 +1,22 @@
+$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);
+ }
+ 
Index: pkgsrc/devel/creduce/patches/patch-clang__delta_RemoveUnusedOuterClass.cpp
diff -u /dev/null pkgsrc/devel/creduce/patches/patch-clang__delta_RemoveUnusedOuterClass.cpp:1.1
--- /dev/null   Fri Nov 18 18:20:05 2016
+++ pkgsrc/devel/creduce/patches/patch-clang__delta_RemoveUnusedOuterClass.cpp  Fri Nov 18 18:20:05 2016
@@ -0,0 +1,13 @@
+$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;
Index: pkgsrc/devel/creduce/patches/patch-clang__delta_RewriteUtils.cpp
diff -u /dev/null pkgsrc/devel/creduce/patches/patch-clang__delta_RewriteUtils.cpp:1.1
--- /dev/null   Fri Nov 18 18:20:05 2016
+++ pkgsrc/devel/creduce/patches/patch-clang__delta_RewriteUtils.cpp    Fri Nov 18 18:20:05 2016
@@ -0,0 +1,22 @@
+$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 {
Index: pkgsrc/devel/creduce/patches/patch-clang__delta_SimplifyStruct.cpp
diff -u /dev/null pkgsrc/devel/creduce/patches/patch-clang__delta_SimplifyStruct.cpp:1.1
--- /dev/null   Fri Nov 18 18:20:05 2016
+++ pkgsrc/devel/creduce/patches/patch-clang__delta_SimplifyStruct.cpp  Fri Nov 18 18:20:05 2016
@@ -0,0 +1,13 @@
+$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;
+ }
Index: pkgsrc/devel/creduce/patches/patch-clang__delta_TransformationManager.cpp
diff -u /dev/null pkgsrc/devel/creduce/patches/patch-clang__delta_TransformationManager.cpp:1.1
--- /dev/null   Fri Nov 18 18:20:05 2016
+++ pkgsrc/devel/creduce/patches/patch-clang__delta_TransformationManager.cpp   Fri Nov 18 18:20:05 2016
@@ -0,0 +1,60 @@
+$NetBSD: patch-clang__delta_TransformationManager.cpp,v 1.1 2016/11/18 18:20:05 joerg Exp $
+
+--- clang_delta/TransformationManager.cpp.orig 2016-11-17 01:58:56.000000000 +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);
+   }
+   else if ((IK == IK_CXX) || (IK == IK_PreprocessedCXX)) {
+     // 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);
+   }
+   else if(IK == IK_OpenCL) {
+     //Commandline parameters
+@@ -121,21 +131,13 @@ bool TransformationManager::initializeCo
+     CompilerInvocation::CreateFromArgs(Invocation,
+                                        &Args[0], &Args[0] + Args.size(),
+                                        ClangInstance->getDiagnostics());
+-    Invocation.setLangDefaults(ClangInstance->getLangOpts(), IK_OpenCL);
++    Invocation.setLangDefaults(ClangInstance->getLangOpts(), IK_OpenCL, Triple, 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