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:   adam
Date:           Mon Apr 20 16:33:51 UTC 2020

Modified Files:
        pkgsrc/devel/creduce: Makefile distinfo
Added Files:
        pkgsrc/devel/creduce/patches:
            patch-clang__delta_TransformationManager.cpp

Log Message:
creduce: port to LLVM 10


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 pkgsrc/devel/creduce/Makefile
cvs rdiff -u -r1.7 -r1.8 pkgsrc/devel/creduce/distinfo
cvs rdiff -u -r0 -r1.6 \
    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.

Modified files:

Index: pkgsrc/devel/creduce/Makefile
diff -u pkgsrc/devel/creduce/Makefile:1.10 pkgsrc/devel/creduce/Makefile:1.11
--- pkgsrc/devel/creduce/Makefile:1.10  Sun Aug 11 13:18:40 2019
+++ pkgsrc/devel/creduce/Makefile       Mon Apr 20 16:33:51 2020
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.10 2019/08/11 13:18:40 wiz Exp $
+# $NetBSD: Makefile,v 1.11 2020/04/20 16:33:51 adam Exp $
 
 DISTNAME=      creduce-2.10.0
-PKGREVISION=   1
+PKGREVISION=   2
 CATEGORIES=    devel
 MASTER_SITES=  https://embed.cs.utah.edu/creduce/
 
@@ -17,7 +17,7 @@ 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
 
-USE_LANGUAGES= c c++11
+USE_LANGUAGES= c c++14
 USE_TOOLS+=    flex perl:run gmake
 GNU_CONFIGURE= yes
 TEST_TARGET=   check

Index: pkgsrc/devel/creduce/distinfo
diff -u pkgsrc/devel/creduce/distinfo:1.7 pkgsrc/devel/creduce/distinfo:1.8
--- pkgsrc/devel/creduce/distinfo:1.7   Sun Jun  2 09:07:39 2019
+++ pkgsrc/devel/creduce/distinfo       Mon Apr 20 16:33:51 2020
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.7 2019/06/02 09:07:39 adam Exp $
+$NetBSD: distinfo,v 1.8 2020/04/20 16:33:51 adam Exp $
 
 SHA1 (creduce-2.10.0.tar.gz) = 77c3dafb2446133ca2f2aeae34b2e4b79de5231d
 RMD160 (creduce-2.10.0.tar.gz) = 183be95aec282812724ec66204952ad33dbc923b
@@ -6,3 +6,4 @@ SHA512 (creduce-2.10.0.tar.gz) = f2f2cc4
 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

Added files:

Index: pkgsrc/devel/creduce/patches/patch-clang__delta_TransformationManager.cpp
diff -u /dev/null pkgsrc/devel/creduce/patches/patch-clang__delta_TransformationManager.cpp:1.6
--- /dev/null   Mon Apr 20 16:33:51 2020
+++ pkgsrc/devel/creduce/patches/patch-clang__delta_TransformationManager.cpp   Mon Apr 20 16:33:51 2020
@@ -0,0 +1,72 @@
+$NetBSD: patch-clang__delta_TransformationManager.cpp,v 1.6 2020/04/20 16:33:51 adam Exp $
+
+Port to LLVM 10.0
+https://github.com/csmith-project/creduce/pull/204/
+
+--- clang_delta/TransformationManager.cpp.orig 2019-05-13 21:17:30.000000000 +0000
++++ clang_delta/TransformationManager.cpp
+@@ -16,6 +16,7 @@
+ 
+ #include <sstream>
+ 
++#include "clang/Basic/Builtins.h"
+ #include "clang/Basic/Diagnostic.h"
+ #include "clang/Basic/TargetInfo.h"
+ #include "clang/Lex/Preprocessor.h"
+@@ -101,6 +102,7 @@ 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() == Language::C) {
++    Invocation.setLangDefaults(ClangInstance->getLangOpts(), InputKind(Language::C), T, PPOpts);
++  }
++  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);
++  }
++  else if(IK.getLanguage() == Language::OpenCL) {
++#endif
+     //Commandline parameters
+     std::vector<const char*> Args;
+     Args.push_back("-x");
+@@ -122,7 +136,7 @@ bool TransformationManager::initializeCo
+     ClangInstance->createFileManager();
+ 
+     if(CLCPath != NULL && ClangInstance->hasFileManager() &&
+-       ClangInstance->getFileManager().getDirectory(CLCPath, false) != NULL) {
++       ClangInstance->getFileManager().getDirectory(CLCPath, false)) {
+         Args.push_back("-I");
+         Args.push_back(CLCPath);
+     }
+@@ -132,10 +146,19 @@ 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
+                                        ClangInstance->getDiagnostics());
+     Invocation.setLangDefaults(ClangInstance->getLangOpts(),
+-                               InputKind::OpenCL, T, PPOpts);
++#if LLVM_VERSION_MAJOR >= 10
++                               InputKind(Language::OpenCL),
++#else
++                               InputKind::OpenCL,
++#endif
++                             T, PPOpts);
+   }
+   else {
+     ErrorMsg = "Unsupported file type!";



Home | Main Index | Thread Index | Old Index