[pkg-d-commits] [ldc] 26/211: Fix linking error when using LLVM < 3.8 and enabled LDC assertions
Matthias Klumpp
mak at moszumanska.debian.org
Sun Apr 23 22:36:06 UTC 2017
This is an automated email from the git hooks/post-receive script.
mak pushed a commit to annotated tag v1.1.0
in repository ldc.
commit f8f92690555e55d0284578237dcf1c3d9b843464
Author: Martin <noone at nowhere.com>
Date: Sat Sep 24 11:33:35 2016 +0200
Fix linking error when using LLVM < 3.8 and enabled LDC assertions
---
gen/ms-cxx-helper.cpp | 3 ++-
gen/ms-cxx-helper.h | 2 ++
gen/trycatchfinally.cpp | 2 ++
3 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/gen/ms-cxx-helper.cpp b/gen/ms-cxx-helper.cpp
index da12d28..2787622 100644
--- a/gen/ms-cxx-helper.cpp
+++ b/gen/ms-cxx-helper.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+#if LDC_LLVM_VER >= 308
+
#include "gen/ms-cxx-helper.h"
#include "gen/llvm.h"
#include "gen/llvmhelpers.h"
@@ -14,7 +16,6 @@
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringExtras.h"
-#if LDC_LLVM_VER >= 308
#include "llvm/Support/raw_ostream.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Transforms/Utils/Cloning.h"
diff --git a/gen/ms-cxx-helper.h b/gen/ms-cxx-helper.h
index 28633df..382fce2 100644
--- a/gen/ms-cxx-helper.h
+++ b/gen/ms-cxx-helper.h
@@ -10,6 +10,7 @@
#ifndef LDC_GEN_MS_CXX_HELPER_H
#define LDC_GEN_MS_CXX_HELPER_H
+#if LDC_LLVM_VER >= 308
#include "gen/irstate.h"
llvm::StructType *getTypeDescriptorType(IRState &irs,
@@ -30,4 +31,5 @@ void cloneBlocks(const std::vector<llvm::BasicBlock *> &srcblocks,
bool isCatchSwitchBlock(llvm::BasicBlock* bb);
+#endif // LDC_LLVM_VER >= 308
#endif // LDC_GEN_MS_CXX_HELPER_H
diff --git a/gen/trycatchfinally.cpp b/gen/trycatchfinally.cpp
index 2690780..48c9dea 100644
--- a/gen/trycatchfinally.cpp
+++ b/gen/trycatchfinally.cpp
@@ -453,7 +453,9 @@ void TryCatchFinallyScopes::pushTryCatch(TryCatchStatement *stmt,
void TryCatchFinallyScopes::popTryCatch() {
tryCatchScopes.pop_back();
if (useMSVCEH()) {
+#if LDC_LLVM_VER >= 308
assert(isCatchSwitchBlock(cleanupScopes.back().beginBlock()));
+#endif
popCleanups(currentCleanupScope() - 1);
} else {
landingPadsPerCleanupScope[currentCleanupScope()].pop_back();
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-d/ldc.git
More information about the pkg-d-commits
mailing list