mirror of
https://abf.rosa.ru/djam/llvm.git
synced 2025-02-24 00:32:49 +00:00
New version 3.4.2, drop merged patches, adjust clang-soname patch
This commit is contained in:
parent
fccf9e175c
commit
813bea8b2b
6 changed files with 19 additions and 432 deletions
4
.abf.yml
4
.abf.yml
|
@ -1,6 +1,6 @@
|
|||
sources:
|
||||
llvm-3.4.src.tar.gz: 10b1fd085b45d8b19adb9a628353ce347bc136b8
|
||||
clang-3.4.src.tar.gz: a6a3c815dd045e9c13c7ae37d2cfefe65607860d
|
||||
clang-tools-extra-3.4.src.tar.gz: 56afa36c2ddd11a53f1e199152b04dfb9347d93a
|
||||
polly-3.4.src.tar.gz: 90891113f687018e6d0c0ad484afc3b221b89a8f
|
||||
compiler-rt-3.4.src.tar.gz: d644b1e4f306f7ad35df0a134d14a1123cd9f082
|
||||
llvm-3.4.2.src.tar.gz: c5287384d0b95ecb0fd7f024be2cdfb60cd94bc9
|
||||
cfe-3.4.2.src.tar.gz: add5420b10c3c3a38c4dc2322f8b64ba0a5def97
|
||||
|
|
|
@ -1,76 +0,0 @@
|
|||
From e0c3dac5c8c5e7789438380f2ad1341055a10360 Mon Sep 17 00:00:00 2001
|
||||
From: Tom Stellard <thomas.stellard@amd.com>
|
||||
Date: Mon, 12 May 2014 17:32:29 +0000
|
||||
Subject: [PATCH 1/3] Merging r201729:
|
||||
|
||||
------------------------------------------------------------------------
|
||||
r201729 | chandlerc | 2014-02-19 17:35:01 -0500 (Wed, 19 Feb 2014) | 21 lines
|
||||
|
||||
Teach Clang to provide ::max_align_t in C11 and C++11 modes.
|
||||
|
||||
This definition is not chosen idly. There is an unfortunate reality with
|
||||
max_align_t -- the specific nature of its definition leaks into the ABI
|
||||
almost immediately. Because it is part of C11 and C++11 it becomes
|
||||
essential for it to match with other systems on that ABI. There is an
|
||||
effort to discourage any further use of this construct as a consequence
|
||||
-- using max_align_t introduces an immediate ABI problem. We can never
|
||||
update it to have larger alignment even as the microarchitecture changes
|
||||
to necessitate higher alignment. =/
|
||||
|
||||
The particular definition here exactly matches the ABI of GCC's chosen
|
||||
::max_align_t definition, for better or worse. This was written with the
|
||||
help of Richard Smith who was decoding the exact ABI implications of the
|
||||
selected definition in GCC. Notably, in-register arguments are impacted
|
||||
by the particular definition chosen. =/
|
||||
|
||||
No one is under the illusion that this is a "good" or "useful"
|
||||
definition of max_align_t, and we are working with the standards
|
||||
committee to specify a more useful interface to address this need.
|
||||
|
||||
------------------------------------------------------------------------
|
||||
|
||||
git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@208600 91177308-0d34-0410-b5e6-96231b3b80d8
|
||||
---
|
||||
lib/Headers/stddef.h | 10 ++++++++++
|
||||
test/Headers/c11.c | 4 ++++
|
||||
2 files changed, 14 insertions(+)
|
||||
|
||||
diff --git a/lib/Headers/stddef.h b/lib/Headers/stddef.h
|
||||
index 6a64d6d..b692694 100644
|
||||
--- a/lib/Headers/stddef.h
|
||||
+++ b/lib/Headers/stddef.h
|
||||
@@ -84,6 +84,16 @@ using ::std::nullptr_t;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
+#if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L
|
||||
+typedef struct {
|
||||
+ long long __clang_max_align_nonce1
|
||||
+ __attribute__((__aligned__(__alignof__(long long))));
|
||||
+ long double __clang_max_align_nonce2
|
||||
+ __attribute__((__aligned__(__alignof__(long double))));
|
||||
+} max_align_t;
|
||||
+#define __CLANG_MAX_ALIGN_T_DEFINED
|
||||
+#endif
|
||||
+
|
||||
#define offsetof(t, d) __builtin_offsetof(t, d)
|
||||
|
||||
#endif /* __STDDEF_H */
|
||||
diff --git a/test/Headers/c11.c b/test/Headers/c11.c
|
||||
index 11bec19..e335d0c 100644
|
||||
--- a/test/Headers/c11.c
|
||||
+++ b/test/Headers/c11.c
|
||||
@@ -22,6 +22,10 @@ _Static_assert(__alignof(c) == 4, "");
|
||||
#define __STDC_WANT_LIB_EXT1__ 1
|
||||
#include <stddef.h>
|
||||
rsize_t x = 0;
|
||||
+_Static_assert(sizeof(max_align_t) >= sizeof(long long), "");
|
||||
+_Static_assert(alignof(max_align_t) >= alignof(long long), "");
|
||||
+_Static_assert(sizeof(max_align_t) >= sizeof(long double), "");
|
||||
+_Static_assert(alignof(max_align_t) >= alignof(long double), "");
|
||||
|
||||
// If we are freestanding, then also check RSIZE_MAX (in a hosted implementation
|
||||
// we will use the host stdint.h, which may not yet have C11 support).
|
||||
--
|
||||
1.9.2
|
||||
|
|
@ -1,77 +0,0 @@
|
|||
From 074a8d3deaca2f135b98669c173bc3d97db670e4 Mon Sep 17 00:00:00 2001
|
||||
From: Tom Stellard <thomas.stellard@amd.com>
|
||||
Date: Mon, 12 May 2014 17:32:31 +0000
|
||||
Subject: [PATCH 2/3] Merging r202911:
|
||||
|
||||
------------------------------------------------------------------------
|
||||
r202911 | david.majnemer | 2014-03-04 18:43:48 -0500 (Tue, 04 Mar 2014) | 14 lines
|
||||
|
||||
Headers: Provide an ABI compatible max_align_t when _MSC_VER is defined
|
||||
|
||||
Summary:
|
||||
Our usual definition of max_align_t wouldn't match up with MSVC if it
|
||||
was used in a template argument.
|
||||
|
||||
Reviewers: chandlerc, rsmith, rnk
|
||||
|
||||
Reviewed By: chandlerc
|
||||
|
||||
CC: cfe-commits
|
||||
|
||||
Differential Revision: http://llvm-reviews.chandlerc.com/D2924
|
||||
|
||||
------------------------------------------------------------------------
|
||||
|
||||
git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@208601 91177308-0d34-0410-b5e6-96231b3b80d8
|
||||
---
|
||||
lib/Headers/stddef.h | 4 ++++
|
||||
test/Headers/c11.c | 5 +++++
|
||||
2 files changed, 9 insertions(+)
|
||||
|
||||
diff --git a/lib/Headers/stddef.h b/lib/Headers/stddef.h
|
||||
index b692694..97126ed 100644
|
||||
--- a/lib/Headers/stddef.h
|
||||
+++ b/lib/Headers/stddef.h
|
||||
@@ -85,12 +85,16 @@ using ::std::nullptr_t;
|
||||
#endif
|
||||
|
||||
#if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L
|
||||
+#ifndef _MSC_VER
|
||||
typedef struct {
|
||||
long long __clang_max_align_nonce1
|
||||
__attribute__((__aligned__(__alignof__(long long))));
|
||||
long double __clang_max_align_nonce2
|
||||
__attribute__((__aligned__(__alignof__(long double))));
|
||||
} max_align_t;
|
||||
+#else
|
||||
+typedef double max_align_t;
|
||||
+#endif
|
||||
#define __CLANG_MAX_ALIGN_T_DEFINED
|
||||
#endif
|
||||
|
||||
diff --git a/test/Headers/c11.c b/test/Headers/c11.c
|
||||
index e335d0c..2debcae 100644
|
||||
--- a/test/Headers/c11.c
|
||||
+++ b/test/Headers/c11.c
|
||||
@@ -1,6 +1,7 @@
|
||||
// RUN: %clang_cc1 -fsyntax-only -verify -std=c11 %s
|
||||
// RUN: %clang_cc1 -fsyntax-only -verify -std=c11 -fmodules %s
|
||||
// RUN: %clang_cc1 -fsyntax-only -verify -std=c11 -ffreestanding %s
|
||||
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c11 -triple i686-pc-win32 -fmsc-version=1700 %s
|
||||
|
||||
noreturn int f(); // expected-error 1+{{}}
|
||||
|
||||
@@ -27,6 +28,10 @@ _Static_assert(alignof(max_align_t) >= alignof(long long), "");
|
||||
_Static_assert(sizeof(max_align_t) >= sizeof(long double), "");
|
||||
_Static_assert(alignof(max_align_t) >= alignof(long double), "");
|
||||
|
||||
+#ifdef _MSC_VER
|
||||
+_Static_assert(sizeof(max_align_t) == sizeof(double), "");
|
||||
+#endif
|
||||
+
|
||||
// If we are freestanding, then also check RSIZE_MAX (in a hosted implementation
|
||||
// we will use the host stdint.h, which may not yet have C11 support).
|
||||
#ifndef __STDC_HOSTED__
|
||||
--
|
||||
1.9.2
|
||||
|
|
@ -1,256 +0,0 @@
|
|||
From 9c7228e582d5c245ee67aeb2cfc646a0f5a1eaf9 Mon Sep 17 00:00:00 2001
|
||||
From: Tom Stellard <thomas.stellard@amd.com>
|
||||
Date: Fri, 16 May 2014 21:05:39 +0000
|
||||
Subject: [PATCH 3/3] Merging r197036:
|
||||
|
||||
------------------------------------------------------------------------
|
||||
r197036 | david.tweed | 2013-12-11 08:39:46 -0500 (Wed, 11 Dec 2013) | 8 lines
|
||||
|
||||
Add front-end infrastructure now address space casts are in LLVM IR.
|
||||
|
||||
With the introduction of explicit address space casts into LLVM, there's
|
||||
a need to provide a new cast kind the front-end can create for C/OpenCL/CUDA
|
||||
and code to produce address space casts from those kinds when appropriate.
|
||||
|
||||
Patch by Michele Scandale!
|
||||
|
||||
------------------------------------------------------------------------
|
||||
|
||||
git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@209029 91177308-0d34-0410-b5e6-96231b3b80d8
|
||||
---
|
||||
include/clang/AST/OperationKinds.h | 5 ++++-
|
||||
lib/AST/Expr.cpp | 7 +++++++
|
||||
lib/AST/ExprConstant.cpp | 2 ++
|
||||
lib/CodeGen/CGExpr.cpp | 1 +
|
||||
lib/CodeGen/CGExprAgg.cpp | 1 +
|
||||
lib/CodeGen/CGExprComplex.cpp | 1 +
|
||||
lib/CodeGen/CGExprConstant.cpp | 7 +++++--
|
||||
lib/CodeGen/CGExprScalar.cpp | 15 +++++++++++++--
|
||||
lib/Edit/RewriteObjCFoundationAPI.cpp | 1 +
|
||||
lib/Sema/SemaExpr.cpp | 15 ++++++++++++---
|
||||
lib/StaticAnalyzer/Core/ExprEngineC.cpp | 1 +
|
||||
11 files changed, 48 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/include/clang/AST/OperationKinds.h b/include/clang/AST/OperationKinds.h
|
||||
index 5e41d95..aba88d6 100644
|
||||
--- a/include/clang/AST/OperationKinds.h
|
||||
+++ b/include/clang/AST/OperationKinds.h
|
||||
@@ -295,7 +295,10 @@ enum CastKind {
|
||||
CK_BuiltinFnToFnPtr,
|
||||
|
||||
// Convert a zero value for OpenCL event_t initialization.
|
||||
- CK_ZeroToOCLEvent
|
||||
+ CK_ZeroToOCLEvent,
|
||||
+
|
||||
+ // Convert a pointer to a different address space.
|
||||
+ CK_AddressSpaceConversion
|
||||
};
|
||||
|
||||
static const CastKind CK_Invalid = static_cast<CastKind>(-1);
|
||||
diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp
|
||||
index 9055dda..6307f4c 100644
|
||||
--- a/lib/AST/Expr.cpp
|
||||
+++ b/lib/AST/Expr.cpp
|
||||
@@ -1474,6 +1474,11 @@ void CastExpr::CheckCastConsistency() const {
|
||||
assert(getSubExpr()->getType()->isFunctionType());
|
||||
goto CheckNoBasePath;
|
||||
|
||||
+ case CK_AddressSpaceConversion:
|
||||
+ assert(getType()->isPointerType());
|
||||
+ assert(getSubExpr()->getType()->isPointerType());
|
||||
+ assert(getType()->getPointeeType().getAddressSpace() !=
|
||||
+ getSubExpr()->getType()->getPointeeType().getAddressSpace());
|
||||
// These should not have an inheritance path.
|
||||
case CK_Dynamic:
|
||||
case CK_ToUnion:
|
||||
@@ -1636,6 +1641,8 @@ const char *CastExpr::getCastKindName() const {
|
||||
return "BuiltinFnToFnPtr";
|
||||
case CK_ZeroToOCLEvent:
|
||||
return "ZeroToOCLEvent";
|
||||
+ case CK_AddressSpaceConversion:
|
||||
+ return "AddressSpaceConversion";
|
||||
}
|
||||
|
||||
llvm_unreachable("Unhandled cast kind!");
|
||||
diff --git a/lib/AST/ExprConstant.cpp b/lib/AST/ExprConstant.cpp
|
||||
index 4cac4fa..a0ae5b6 100644
|
||||
--- a/lib/AST/ExprConstant.cpp
|
||||
+++ b/lib/AST/ExprConstant.cpp
|
||||
@@ -7109,6 +7109,7 @@ bool IntExprEvaluator::VisitCastExpr(const CastExpr *E) {
|
||||
case CK_BuiltinFnToFnPtr:
|
||||
case CK_ZeroToOCLEvent:
|
||||
case CK_NonAtomicToAtomic:
|
||||
+ case CK_AddressSpaceConversion:
|
||||
llvm_unreachable("invalid cast kind for integral value");
|
||||
|
||||
case CK_BitCast:
|
||||
@@ -7581,6 +7582,7 @@ bool ComplexExprEvaluator::VisitCastExpr(const CastExpr *E) {
|
||||
case CK_BuiltinFnToFnPtr:
|
||||
case CK_ZeroToOCLEvent:
|
||||
case CK_NonAtomicToAtomic:
|
||||
+ case CK_AddressSpaceConversion:
|
||||
llvm_unreachable("invalid cast kind for complex value");
|
||||
|
||||
case CK_LValueToRValue:
|
||||
diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp
|
||||
index cb990b2..92966d0 100644
|
||||
--- a/lib/CodeGen/CGExpr.cpp
|
||||
+++ b/lib/CodeGen/CGExpr.cpp
|
||||
@@ -2744,6 +2744,7 @@ LValue CodeGenFunction::EmitCastLValue(const CastExpr *E) {
|
||||
case CK_ARCReclaimReturnedObject:
|
||||
case CK_ARCExtendBlockObject:
|
||||
case CK_CopyAndAutoreleaseBlockObject:
|
||||
+ case CK_AddressSpaceConversion:
|
||||
return EmitUnsupportedLValue(E, "unexpected cast lvalue");
|
||||
|
||||
case CK_Dependent:
|
||||
diff --git a/lib/CodeGen/CGExprAgg.cpp b/lib/CodeGen/CGExprAgg.cpp
|
||||
index 9d0f3a9..35e6988 100644
|
||||
--- a/lib/CodeGen/CGExprAgg.cpp
|
||||
+++ b/lib/CodeGen/CGExprAgg.cpp
|
||||
@@ -713,6 +713,7 @@ void AggExprEmitter::VisitCastExpr(CastExpr *E) {
|
||||
case CK_CopyAndAutoreleaseBlockObject:
|
||||
case CK_BuiltinFnToFnPtr:
|
||||
case CK_ZeroToOCLEvent:
|
||||
+ case CK_AddressSpaceConversion:
|
||||
llvm_unreachable("cast kind invalid for aggregate types");
|
||||
}
|
||||
}
|
||||
diff --git a/lib/CodeGen/CGExprComplex.cpp b/lib/CodeGen/CGExprComplex.cpp
|
||||
index 73d5bcb..74a2579 100644
|
||||
--- a/lib/CodeGen/CGExprComplex.cpp
|
||||
+++ b/lib/CodeGen/CGExprComplex.cpp
|
||||
@@ -475,6 +475,7 @@ ComplexPairTy ComplexExprEmitter::EmitCast(CastExpr::CastKind CK, Expr *Op,
|
||||
case CK_CopyAndAutoreleaseBlockObject:
|
||||
case CK_BuiltinFnToFnPtr:
|
||||
case CK_ZeroToOCLEvent:
|
||||
+ case CK_AddressSpaceConversion:
|
||||
llvm_unreachable("invalid cast kind for complex value");
|
||||
|
||||
case CK_FloatingRealToComplex:
|
||||
diff --git a/lib/CodeGen/CGExprConstant.cpp b/lib/CodeGen/CGExprConstant.cpp
|
||||
index f4d6861..ad3e1fc 100644
|
||||
--- a/lib/CodeGen/CGExprConstant.cpp
|
||||
+++ b/lib/CodeGen/CGExprConstant.cpp
|
||||
@@ -633,6 +633,9 @@ public:
|
||||
return llvm::ConstantStruct::get(STy, Elts);
|
||||
}
|
||||
|
||||
+ case CK_AddressSpaceConversion:
|
||||
+ return llvm::ConstantExpr::getAddrSpaceCast(C, destType);
|
||||
+
|
||||
case CK_LValueToRValue:
|
||||
case CK_AtomicToNonAtomic:
|
||||
case CK_NonAtomicToAtomic:
|
||||
@@ -1062,13 +1065,13 @@ llvm::Constant *CodeGenModule::EmitConstantValue(const APValue &Value,
|
||||
if (!Offset->isNullValue()) {
|
||||
llvm::Constant *Casted = llvm::ConstantExpr::getBitCast(C, Int8PtrTy);
|
||||
Casted = llvm::ConstantExpr::getGetElementPtr(Casted, Offset);
|
||||
- C = llvm::ConstantExpr::getBitCast(Casted, C->getType());
|
||||
+ C = llvm::ConstantExpr::getPointerCast(Casted, C->getType());
|
||||
}
|
||||
|
||||
// Convert to the appropriate type; this could be an lvalue for
|
||||
// an integer.
|
||||
if (isa<llvm::PointerType>(DestTy))
|
||||
- return llvm::ConstantExpr::getBitCast(C, DestTy);
|
||||
+ return llvm::ConstantExpr::getPointerCast(C, DestTy);
|
||||
|
||||
return llvm::ConstantExpr::getPtrToInt(C, DestTy);
|
||||
} else {
|
||||
diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp
|
||||
index f3a5387..26e327a 100644
|
||||
--- a/lib/CodeGen/CGExprScalar.cpp
|
||||
+++ b/lib/CodeGen/CGExprScalar.cpp
|
||||
@@ -1299,7 +1299,18 @@ Value *ScalarExprEmitter::VisitCastExpr(CastExpr *CE) {
|
||||
case CK_AnyPointerToBlockPointerCast:
|
||||
case CK_BitCast: {
|
||||
Value *Src = Visit(const_cast<Expr*>(E));
|
||||
- return Builder.CreateBitCast(Src, ConvertType(DestTy));
|
||||
+ llvm::Type *SrcTy = Src->getType();
|
||||
+ llvm::Type *DstTy = ConvertType(DestTy);
|
||||
+ if (SrcTy->isPtrOrPtrVectorTy() && DstTy->isPtrOrPtrVectorTy() &&
|
||||
+ SrcTy->getPointerAddressSpace() != DstTy->getPointerAddressSpace()) {
|
||||
+ llvm::Type *MidTy = CGF.CGM.getDataLayout().getIntPtrType(SrcTy);
|
||||
+ return Builder.CreateIntToPtr(Builder.CreatePtrToInt(Src, MidTy), DstTy);
|
||||
+ }
|
||||
+ return Builder.CreateBitCast(Src, DstTy);
|
||||
+ }
|
||||
+ case CK_AddressSpaceConversion: {
|
||||
+ Value *Src = Visit(const_cast<Expr*>(E));
|
||||
+ return Builder.CreateAddrSpaceCast(Src, ConvertType(DestTy));
|
||||
}
|
||||
case CK_AtomicToNonAtomic:
|
||||
case CK_NonAtomicToAtomic:
|
||||
@@ -1360,7 +1371,7 @@ Value *ScalarExprEmitter::VisitCastExpr(CastExpr *CE) {
|
||||
|
||||
// Make sure the array decay ends up being the right type. This matters if
|
||||
// the array type was of an incomplete type.
|
||||
- return CGF.Builder.CreateBitCast(V, ConvertType(CE->getType()));
|
||||
+ return CGF.Builder.CreatePointerCast(V, ConvertType(CE->getType()));
|
||||
}
|
||||
case CK_FunctionToPointerDecay:
|
||||
return EmitLValue(E).getAddress();
|
||||
diff --git a/lib/Edit/RewriteObjCFoundationAPI.cpp b/lib/Edit/RewriteObjCFoundationAPI.cpp
|
||||
index f4206fb..879c17a 100644
|
||||
--- a/lib/Edit/RewriteObjCFoundationAPI.cpp
|
||||
+++ b/lib/Edit/RewriteObjCFoundationAPI.cpp
|
||||
@@ -1033,6 +1033,7 @@ static bool rewriteToNumericBoxedExpression(const ObjCMessageExpr *Msg,
|
||||
case CK_IntegralComplexToReal:
|
||||
case CK_IntegralComplexToBoolean:
|
||||
case CK_AtomicToNonAtomic:
|
||||
+ case CK_AddressSpaceConversion:
|
||||
needsCast = true;
|
||||
break;
|
||||
|
||||
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
|
||||
index e1f65f4..992e66a 100644
|
||||
--- a/lib/Sema/SemaExpr.cpp
|
||||
+++ b/lib/Sema/SemaExpr.cpp
|
||||
@@ -4876,8 +4876,13 @@ CastKind Sema::PrepareScalarCast(ExprResult &Src, QualType DestTy) {
|
||||
case Type::STK_BlockPointer:
|
||||
case Type::STK_ObjCObjectPointer:
|
||||
switch (DestTy->getScalarTypeKind()) {
|
||||
- case Type::STK_CPointer:
|
||||
+ case Type::STK_CPointer: {
|
||||
+ unsigned SrcAS = SrcTy->getPointeeType().getAddressSpace();
|
||||
+ unsigned DestAS = DestTy->getPointeeType().getAddressSpace();
|
||||
+ if (SrcAS != DestAS)
|
||||
+ return CK_AddressSpaceConversion;
|
||||
return CK_BitCast;
|
||||
+ }
|
||||
case Type::STK_BlockPointer:
|
||||
return (SrcKind == Type::STK_BlockPointer
|
||||
? CK_BitCast : CK_AnyPointerToBlockPointerCast);
|
||||
@@ -7830,10 +7835,14 @@ QualType Sema::CheckCompareOperands(ExprResult &LHS, ExprResult &RHS,
|
||||
diagnoseDistinctPointerComparison(*this, Loc, LHS, RHS, /*isError*/false);
|
||||
}
|
||||
if (LCanPointeeTy != RCanPointeeTy) {
|
||||
+ unsigned AddrSpaceL = LCanPointeeTy.getAddressSpace();
|
||||
+ unsigned AddrSpaceR = RCanPointeeTy.getAddressSpace();
|
||||
+ CastKind Kind = AddrSpaceL != AddrSpaceR ? CK_AddressSpaceConversion
|
||||
+ : CK_BitCast;
|
||||
if (LHSIsNull && !RHSIsNull)
|
||||
- LHS = ImpCastExprToType(LHS.take(), RHSType, CK_BitCast);
|
||||
+ LHS = ImpCastExprToType(LHS.take(), RHSType, Kind);
|
||||
else
|
||||
- RHS = ImpCastExprToType(RHS.take(), LHSType, CK_BitCast);
|
||||
+ RHS = ImpCastExprToType(RHS.take(), LHSType, Kind);
|
||||
}
|
||||
return ResultTy;
|
||||
}
|
||||
diff --git a/lib/StaticAnalyzer/Core/ExprEngineC.cpp b/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
||||
index 983fda0..9ba086c 100644
|
||||
--- a/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
||||
+++ b/lib/StaticAnalyzer/Core/ExprEngineC.cpp
|
||||
@@ -286,6 +286,7 @@ void ExprEngine::VisitCast(const CastExpr *CastE, const Expr *Ex,
|
||||
case CK_Dependent:
|
||||
case CK_ArrayToPointerDecay:
|
||||
case CK_BitCast:
|
||||
+ case CK_AddressSpaceConversion:
|
||||
case CK_IntegralCast:
|
||||
case CK_NullToPointer:
|
||||
case CK_IntegralToPointer:
|
||||
--
|
||||
1.9.2
|
||||
|
|
@ -5,7 +5,7 @@
|
|||
# Add soname to the library.
|
||||
ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux FreeBSD GNU GNU/kFreeBSD))
|
||||
- LLVMLibsOptions += -Wl,-soname,lib$(LIBRARYNAME)$(SHLIBEXT)
|
||||
+ LLVMLibsOptions += -Wl,-soname,lib$(LIBRARYNAME)-$(LLVMVersion)$(SHLIBEXT)
|
||||
+ LLVMLibsOptions += -Wl,-soname,lib$(LIBRARYNAME)-$(LLVM_VERSION_MAJOR).$(LLVM_VERSION_MINOR)$(SHLIBEXT)
|
||||
endif
|
||||
|
||||
##===----------------------------------------------------------------------===##
|
||||
|
|
36
llvm.spec
36
llvm.spec
|
@ -10,9 +10,12 @@
|
|||
%bcond_without clang
|
||||
%bcond_without ocaml
|
||||
|
||||
%define major_ver 3.4
|
||||
%define minor_ver 2
|
||||
|
||||
Summary: Low Level Virtual Machine (LLVM)
|
||||
Name: llvm
|
||||
Version: 3.4
|
||||
Version: %{major_ver}.%{minor_ver}
|
||||
Release: 1
|
||||
License: NCSA
|
||||
Group: Development/Other
|
||||
|
@ -23,10 +26,10 @@ Url: http://llvm.org/
|
|||
# more or less identical to upstream llvm).
|
||||
# At times it may be necessary to package this branch instead.
|
||||
Source0: http://llvm.org/releases/%{version}/llvm-%{version}.src.tar.gz
|
||||
Source1: http://llvm.org/releases/%{version}/clang-%{version}.src.tar.gz
|
||||
Source2: http://llvm.org/releases/%{version}/clang-tools-extra-%{version}.src.tar.gz
|
||||
Source3: http://llvm.org/releases/%{version}/polly-%{version}.src.tar.gz
|
||||
Source4: http://llvm.org/releases/%{version}/compiler-rt-%{version}.src.tar.gz
|
||||
Source1: http://llvm.org/releases/%{version}/cfe-%{version}.src.tar.gz
|
||||
Source2: http://llvm.org/releases/%{version}/clang-tools-extra-%{major_ver}.src.tar.gz
|
||||
Source3: http://llvm.org/releases/%{version}/polly-%{major_ver}.src.tar.gz
|
||||
Source4: http://llvm.org/releases/%{version}/compiler-rt-%{major_ver}.src.tar.gz
|
||||
Source1000: llvm.rpmlintrc
|
||||
# Versionize libclang.so (Anssi 08/2012):
|
||||
Patch0: clang-soname.patch
|
||||
|
@ -36,9 +39,6 @@ Patch1: 0000-clang-mandriva.patch
|
|||
# see http://llvm.org/bugs/show_bug.cgi?id=15557
|
||||
# and https://bugzilla.redhat.com/show_bug.cgi?id=803433
|
||||
Patch2: clang-hardfloat-hack.patch
|
||||
Patch201: 0201-Merging-r201729.patch
|
||||
Patch202: 0202-Merging-r202911.patch
|
||||
Patch203: 0203-Merging-r197036.patch
|
||||
BuildRequires: bison
|
||||
BuildRequires: chrpath
|
||||
BuildRequires: flex
|
||||
|
@ -103,7 +103,7 @@ for effective implementation, proper tail calls or garbage collection.
|
|||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
%define major %{version}
|
||||
%define major %{major_ver}
|
||||
%define libname %mklibname %{name} %{major}
|
||||
|
||||
%package -n %{libname}
|
||||
|
@ -262,7 +262,7 @@ as libraries and designed to be loosely-coupled and extensible.
|
|||
#----------------------------------------------------------------------------
|
||||
|
||||
%if %{with clang}
|
||||
%define clang_major %{version}
|
||||
%define clang_major %{major_ver}
|
||||
%define libclang %mklibname clang %{clang_major}
|
||||
|
||||
%package -n %{libclang}
|
||||
|
@ -346,21 +346,17 @@ Documentation for the Clang compiler front-end.
|
|||
#----------------------------------------------------------------------------
|
||||
|
||||
%prep
|
||||
%setup -qn %{name}-%{version} %{?with_clang:-a1 -a2 -a3 -a4}
|
||||
%setup -qn %{name}-%{version}.src %{?with_clang:-a1 -a2 -a3 -a4}
|
||||
rm -rf tools/clang
|
||||
%if %{with clang}
|
||||
mv clang-%{version}%{?prerel} tools/clang
|
||||
mv polly-%{version}%{?prerel} tools/polly
|
||||
mv clang-tools-extra-%{version}%{?prerel} tools/clang/tools/extra
|
||||
mv compiler-rt-%{version}%{?prerel} projects/compiler-rt
|
||||
mv cfe-%{version}.src tools/clang
|
||||
mv polly-%{major_ver} tools/polly
|
||||
mv clang-tools-extra-%{major_ver} tools/clang/tools/extra
|
||||
mv compiler-rt-%{major_ver} projects/compiler-rt
|
||||
cd tools/clang
|
||||
%patch0 -p0
|
||||
%patch1 -p1 -b .mandriva~
|
||||
%patch2 -p1 -b .armhf
|
||||
|
||||
%patch201 -p1
|
||||
%patch202 -p1
|
||||
%patch203 -p1
|
||||
cd -
|
||||
%endif
|
||||
|
||||
|
@ -439,7 +435,7 @@ done
|
|||
|
||||
%if %{with clang}
|
||||
# Versionize libclang.so (patch0 makes the same change to soname) and move it to standard path.
|
||||
mv %{buildroot}%{_libdir}/llvm/libclang.so %{buildroot}%{_libdir}/libclang-%{version}.so
|
||||
mv %{buildroot}%{_libdir}/llvm/libclang.so %{buildroot}%{_libdir}/libclang-%{clang_major}.so
|
||||
ln -s libclang-%{clang_major}.so %{buildroot}%{_libdir}/libclang.so
|
||||
ln -s ../libclang.so %{buildroot}%{_libdir}/llvm/libclang.so
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue