OBS-URL: https://build.opensuse.org/package/show/devel:tools:statica/klee?expand=0&rev=43
86 lines
2.5 KiB
Diff
86 lines
2.5 KiB
Diff
From: Jiri Slaby <jirislaby@gmail.com>
|
|
Date: Mon, 21 May 2018 15:12:44 +0200
|
|
Subject: llvm60: SetVersionPrinter now passes down a stream
|
|
Patch-mainline: no
|
|
|
|
I.e. klee::printVersion should now have a parameter -- the output
|
|
stream. Change both the prototype and the implementation to handle this
|
|
properly.
|
|
|
|
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
|
|
---
|
|
include/klee/Internal/Support/PrintVersion.h | 8 +++++++
|
|
lib/Support/PrintVersion.cpp | 23 ++++++++++++++------
|
|
2 files changed, 24 insertions(+), 7 deletions(-)
|
|
|
|
diff --git a/include/klee/Internal/Support/PrintVersion.h b/include/klee/Internal/Support/PrintVersion.h
|
|
index 2c375ad2b946..87f73a002914 100644
|
|
--- a/include/klee/Internal/Support/PrintVersion.h
|
|
+++ b/include/klee/Internal/Support/PrintVersion.h
|
|
@@ -10,8 +10,16 @@
|
|
#ifndef KLEE_PRINT_VERSION_H
|
|
#define KLEE_PRINT_VERSION_H
|
|
|
|
+#include "llvm/Support/raw_ostream.h"
|
|
+
|
|
+#include "klee/Config/Version.h"
|
|
+
|
|
namespace klee {
|
|
+#if LLVM_VERSION_CODE >= LLVM_VERSION(6, 0)
|
|
+ void printVersion(llvm::raw_ostream &OS);
|
|
+#else
|
|
void printVersion();
|
|
+#endif
|
|
}
|
|
|
|
#endif
|
|
diff --git a/lib/Support/PrintVersion.cpp b/lib/Support/PrintVersion.cpp
|
|
index d39249df023f..b7f2b6ff347a 100644
|
|
--- a/lib/Support/PrintVersion.cpp
|
|
+++ b/lib/Support/PrintVersion.cpp
|
|
@@ -9,25 +9,34 @@
|
|
|
|
#include "klee/Internal/Support/PrintVersion.h"
|
|
#include "klee/Config/config.h"
|
|
+#include "klee/Config/Version.h"
|
|
#include "llvm/Support/raw_ostream.h"
|
|
#include "llvm/Support/CommandLine.h"
|
|
|
|
#include "klee/Config/CompileTimeInfo.h"
|
|
|
|
+#if LLVM_VERSION_CODE >= LLVM_VERSION(6, 0)
|
|
+void klee::printVersion(llvm::raw_ostream &OS)
|
|
+#else
|
|
void klee::printVersion()
|
|
+#endif
|
|
{
|
|
- llvm::outs() << PACKAGE_STRING " (" PACKAGE_URL ")\n";
|
|
+#if LLVM_VERSION_CODE < LLVM_VERSION(6, 0)
|
|
+ llvm::raw_ostream &OS = llvm::outs();
|
|
+#endif
|
|
+
|
|
+ OS << PACKAGE_STRING " (" PACKAGE_URL ")\n";
|
|
#ifdef KLEE_ENABLE_TIMESTAMP
|
|
- llvm::outs() << " Built " __DATE__ " (" __TIME__ ")\n";
|
|
+ OS << " Built " __DATE__ " (" __TIME__ ")\n";
|
|
#endif
|
|
- llvm::outs() << " Build mode: " << KLEE_BUILD_MODE "\n";
|
|
- llvm::outs() << " Build revision: ";
|
|
+ OS << " Build mode: " << KLEE_BUILD_MODE "\n";
|
|
+ OS << " Build revision: ";
|
|
#ifdef KLEE_BUILD_REVISION
|
|
- llvm::outs() << KLEE_BUILD_REVISION "\n";
|
|
+ OS << KLEE_BUILD_REVISION "\n";
|
|
#else
|
|
- llvm::outs() << "unknown\n";
|
|
+ OS << "unknown\n";
|
|
#endif
|
|
// Show LLVM version information
|
|
- llvm::outs() << "\n";
|
|
+ OS << "\n";
|
|
llvm::cl::PrintVersionMessage();
|
|
}
|
|
--
|
|
2.17.0
|
|
|