- Update to svn revision 154914 from 3.1 branch
OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm?expand=0&rev=131
This commit is contained in:
parent
cb4e7901f6
commit
930a88b69d
@ -1,11 +1,12 @@
|
||||
--- tools/clang/lib/Driver/ToolChains.cpp 2011-08-12 11:19:35.000000000 +0200
|
||||
+++ tools/clang/lib/Driver/ToolChains.cpp 2011-08-12 12:10:47.733446958 +0200
|
||||
@@ -1346,8 +1346,7 @@
|
||||
Index: llvm/tools/clang/lib/Driver/ToolChains.cpp
|
||||
===================================================================
|
||||
--- llvm.orig/tools/clang/lib/Driver/ToolChains.cpp
|
||||
+++ llvm/tools/clang/lib/Driver/ToolChains.cpp
|
||||
@@ -1840,7 +1840,7 @@ static bool IsRedhat(enum LinuxDistro Di
|
||||
}
|
||||
|
||||
static bool IsOpenSuse(enum LinuxDistro Distro) {
|
||||
- return Distro == OpenSuse11_3 || Distro == OpenSuse11_4 ||
|
||||
- Distro == OpenSuse12_1;
|
||||
- return Distro >= OpenSuse11_3 && Distro <= OpenSuse12_1;
|
||||
+ return true;
|
||||
}
|
||||
|
||||
|
21
clang-fix-mips-test.patch
Normal file
21
clang-fix-mips-test.patch
Normal file
@ -0,0 +1,21 @@
|
||||
Index: llvm/tools/clang/test/Driver/linux-ld.c
|
||||
===================================================================
|
||||
--- llvm.orig/tools/clang/test/Driver/linux-ld.c
|
||||
+++ llvm/tools/clang/test/Driver/linux-ld.c
|
||||
@@ -194,14 +194,14 @@
|
||||
// RUN: | FileCheck --check-prefix=CHECK-MIPS %s
|
||||
// CHECK-MIPS: "{{.*}}ld{{(.exe)?}}"
|
||||
// CHECK-MIPS: "-m" "elf32btsmip"
|
||||
-// CHECK-MIPS: "-dynamic-linker" "{{.*}}/lib/ld.so.1"
|
||||
+// CHECK-MIPS: "-dynamic-linker" "{{.*}}/lib64/ld.so.1"
|
||||
// CHECK-MIPS-NOT: "--hash-style={{gnu|both}}"
|
||||
// RUN: %clang %s -### -o %t.o 2>&1 \
|
||||
// RUN: -target mipsel-linux-gnu -ccc-clang-archs mipsel \
|
||||
// RUN: | FileCheck --check-prefix=CHECK-MIPSEL %s
|
||||
// CHECK-MIPSEL: "{{.*}}ld{{(.exe)?}}"
|
||||
// CHECK-MIPSEL: "-m" "elf32ltsmip"
|
||||
-// CHECK-MIPSEL: "-dynamic-linker" "{{.*}}/lib/ld.so.1"
|
||||
+// CHECK-MIPSEL: "-dynamic-linker" "{{.*}}/lib64/ld.so.1"
|
||||
// CHECK-MIPSEL-NOT: "--hash-style={{gnu|both}}"
|
||||
// RUN: %clang %s -### -o %t.o 2>&1 \
|
||||
// RUN: -target mips64-linux-gnu -ccc-clang-archs mips64 \
|
@ -1,134 +0,0 @@
|
||||
Index: test/CodeGen/pr9614.c
|
||||
===================================================================
|
||||
--- test/CodeGen/pr9614.c (revision 146866)
|
||||
+++ test/CodeGen/pr9614.c (revision 146867)
|
||||
@@ -1,4 +1,4 @@
|
||||
-// RUN: %clang_cc1 -emit-llvm %s -O1 -o - | FileCheck %s
|
||||
+// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
|
||||
|
||||
extern void foo_alias (void) __asm ("foo");
|
||||
inline void foo (void) {
|
||||
@@ -8,15 +8,22 @@
|
||||
inline __attribute__ ((__always_inline__)) void bar (void) {
|
||||
return bar_alias ();
|
||||
}
|
||||
+extern char *strrchr_foo (const char *__s, int __c) __asm ("strrchr");
|
||||
+extern inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) char * strrchr_foo (const char *__s, int __c) {
|
||||
+ return __builtin_strrchr (__s, __c);
|
||||
+}
|
||||
void f(void) {
|
||||
foo();
|
||||
bar();
|
||||
+ strrchr_foo("", '.');
|
||||
}
|
||||
|
||||
// CHECK: define void @f()
|
||||
// CHECK: call void @foo()
|
||||
// CHECK-NEXT: call void @bar()
|
||||
+// CHECK-NEXT: call i8* @strrchr(
|
||||
// CHECK-NEXT: ret void
|
||||
|
||||
// CHECK: declare void @foo()
|
||||
// CHECK: declare void @bar()
|
||||
+// CHECK: declare i8* @strrchr(i8*, i32)
|
||||
Index: lib/CodeGen/CodeGenModule.h
|
||||
===================================================================
|
||||
--- lib/CodeGen/CodeGenModule.h (revision 146866)
|
||||
+++ lib/CodeGen/CodeGenModule.h (revision 146867)
|
||||
@@ -323,7 +323,7 @@
|
||||
void createOpenCLRuntime();
|
||||
void createCUDARuntime();
|
||||
|
||||
- bool isTriviallyRecursiveViaAsm(const FunctionDecl *F);
|
||||
+ bool isTriviallyRecursive(const FunctionDecl *F);
|
||||
bool shouldEmitFunction(const FunctionDecl *F);
|
||||
llvm::LLVMContext &VMContext;
|
||||
|
||||
Index: lib/CodeGen/CodeGenModule.cpp
|
||||
===================================================================
|
||||
--- lib/CodeGen/CodeGenModule.cpp (revision 146866)
|
||||
+++ lib/CodeGen/CodeGenModule.cpp (revision 146867)
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "clang/AST/Mangle.h"
|
||||
#include "clang/AST/RecordLayout.h"
|
||||
#include "clang/AST/RecursiveASTVisitor.h"
|
||||
+#include "clang/Basic/Builtins.h"
|
||||
#include "clang/Basic/Diagnostic.h"
|
||||
#include "clang/Basic/SourceManager.h"
|
||||
#include "clang/Basic/TargetInfo.h"
|
||||
@@ -863,20 +864,27 @@
|
||||
struct FunctionIsDirectlyRecursive :
|
||||
public RecursiveASTVisitor<FunctionIsDirectlyRecursive> {
|
||||
const StringRef Name;
|
||||
+ const Builtin::Context &BI;
|
||||
bool Result;
|
||||
- FunctionIsDirectlyRecursive(const FunctionDecl *F) :
|
||||
- Name(F->getName()), Result(false) {
|
||||
+ FunctionIsDirectlyRecursive(StringRef N, const Builtin::Context &C) :
|
||||
+ Name(N), BI(C), Result(false) {
|
||||
}
|
||||
typedef RecursiveASTVisitor<FunctionIsDirectlyRecursive> Base;
|
||||
|
||||
bool TraverseCallExpr(CallExpr *E) {
|
||||
- const Decl *D = E->getCalleeDecl();
|
||||
- if (!D)
|
||||
+ const FunctionDecl *FD = E->getDirectCallee();
|
||||
+ if (!FD)
|
||||
return true;
|
||||
- AsmLabelAttr *Attr = D->getAttr<AsmLabelAttr>();
|
||||
- if (!Attr)
|
||||
+ AsmLabelAttr *Attr = FD->getAttr<AsmLabelAttr>();
|
||||
+ if (Attr && Name == Attr->getLabel()) {
|
||||
+ Result = true;
|
||||
+ return false;
|
||||
+ }
|
||||
+ unsigned BuiltinID = FD->getBuiltinID();
|
||||
+ if (!BuiltinID)
|
||||
return true;
|
||||
- if (Name == Attr->getLabel()) {
|
||||
+ const char *BuiltinName = BI.GetName(BuiltinID) + strlen("__builtin_");
|
||||
+ if (Name == BuiltinName) {
|
||||
Result = true;
|
||||
return false;
|
||||
}
|
||||
@@ -885,15 +893,24 @@
|
||||
};
|
||||
}
|
||||
|
||||
-// isTriviallyRecursiveViaAsm - Check if this function calls another
|
||||
-// decl that, because of the asm attribute, ends up pointing to itself.
|
||||
+// isTriviallyRecursive - Check if this function calls another
|
||||
+// decl that, because of the asm attribute or the other decl being a builtin,
|
||||
+// ends up pointing to itself.
|
||||
bool
|
||||
-CodeGenModule::isTriviallyRecursiveViaAsm(const FunctionDecl *F) {
|
||||
- if (getCXXABI().getMangleContext().shouldMangleDeclName(F))
|
||||
- return false;
|
||||
+CodeGenModule::isTriviallyRecursive(const FunctionDecl *FD) {
|
||||
+ StringRef Name;
|
||||
+ if (getCXXABI().getMangleContext().shouldMangleDeclName(FD)) {
|
||||
+ // asm labels are a special king of mangling we have to support.
|
||||
+ AsmLabelAttr *Attr = FD->getAttr<AsmLabelAttr>();
|
||||
+ if (!Attr)
|
||||
+ return false;
|
||||
+ Name = Attr->getLabel();
|
||||
+ } else {
|
||||
+ Name = FD->getName();
|
||||
+ }
|
||||
|
||||
- FunctionIsDirectlyRecursive Walker(F);
|
||||
- Walker.TraverseFunctionDecl(const_cast<FunctionDecl*>(F));
|
||||
+ FunctionIsDirectlyRecursive Walker(Name, Context.BuiltinInfo);
|
||||
+ Walker.TraverseFunctionDecl(const_cast<FunctionDecl*>(FD));
|
||||
return Walker.Result;
|
||||
}
|
||||
|
||||
@@ -909,7 +926,7 @@
|
||||
// but a function that calls itself is clearly not equivalent to the real
|
||||
// implementation.
|
||||
// This happens in glibc's btowc and in some configure checks.
|
||||
- return !isTriviallyRecursiveViaAsm(F);
|
||||
+ return !isTriviallyRecursive(F);
|
||||
}
|
||||
|
||||
void CodeGenModule::EmitGlobalDefinition(GlobalDecl GD) {
|
@ -1,31 +0,0 @@
|
||||
Index: test/CodeGenCXX/visibility-inlines-hidden.cpp
|
||||
===================================================================
|
||||
--- test/CodeGenCXX/visibility-inlines-hidden.cpp (revision 147294)
|
||||
+++ test/CodeGenCXX/visibility-inlines-hidden.cpp (revision 147295)
|
||||
@@ -97,3 +97,14 @@
|
||||
|
||||
// CHECK: define available_externally void @_ZN5test22ns3fooINS_1BINS_1AEEEEEvv()
|
||||
}
|
||||
+
|
||||
+namespace PR11642 {
|
||||
+ template <typename T>
|
||||
+ class Foo {
|
||||
+ public:
|
||||
+ T foo(T x) { return x; }
|
||||
+ };
|
||||
+ extern template class Foo<int>;
|
||||
+ template class Foo<int>;
|
||||
+ // CHECK: define weak_odr i32 @_ZN7PR116423FooIiE3fooEi
|
||||
+}
|
||||
Index: lib/AST/Decl.cpp
|
||||
===================================================================
|
||||
--- lib/AST/Decl.cpp (revision 147294)
|
||||
+++ lib/AST/Decl.cpp (revision 147295)
|
||||
@@ -568,6 +568,7 @@
|
||||
// about whether containing classes have visibility attributes,
|
||||
// and that's intentional.
|
||||
if (TSK != TSK_ExplicitInstantiationDeclaration &&
|
||||
+ TSK != TSK_ExplicitInstantiationDefinition &&
|
||||
F.ConsiderGlobalVisibility &&
|
||||
MD->getASTContext().getLangOptions().InlineVisibilityHidden) {
|
||||
// InlineVisibilityHidden only applies to definitions, and
|
3
llvm-3.0.99+svn154914.tar.bz2
Normal file
3
llvm-3.0.99+svn154914.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:af9ae518982b9385f4bceae48eafcf1ffb309bbd2422a5a95aa1df00f0d216aa
|
||||
size 16144645
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d9486d9f956ceb8002377406368ad871f41ce01e95ba3b735757df4beaaa3374
|
||||
size 13988408
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 17 07:48:50 UTC 2012 - idonmez@suse.com
|
||||
|
||||
- Update to svn revision 154914 from 3.1 branch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 20 12:40:27 UTC 2012 - idonmez@suse.com
|
||||
|
||||
|
45
llvm.spec
45
llvm.spec
@ -16,12 +16,12 @@
|
||||
#
|
||||
|
||||
|
||||
%define _revision 145598
|
||||
%define _release_version 3.0
|
||||
%define _revision 154914
|
||||
%define _release_version 3.1
|
||||
%define _supported_archs "arm,x86"
|
||||
|
||||
Name: llvm
|
||||
Version: 3.0
|
||||
Version: 3.0.99+svn154914
|
||||
Release: 0
|
||||
Summary: Low Level Virtual Machine
|
||||
License: NCSA
|
||||
@ -32,15 +32,12 @@ Source100: %{name}-rpmlintrc
|
||||
# PATCH-FIX-OPENSUSE set-revision.patch idoenmez@suse.de -- Allow us to set revision
|
||||
Patch1: set-revision.patch
|
||||
# PATCH-FIX-OPENSUSE assume-opensuse.patch idoenmez@suse.de -- Always enable openSUSE/SUSE features
|
||||
Patch3: assume-opensuse.patch
|
||||
# PATCH-FIX-UPSTREAM clang-glibc2.14.patch idoenmez@suse.de -- Support glibc 2.14 headers
|
||||
Patch4: clang-glibc2.14.patch
|
||||
Patch2: assume-opensuse.patch
|
||||
# PATCH-FIX-OPENSUSE clang-disable-ada-extension.patch idoenmez@suse.de -- Don't run gcc for ada files
|
||||
Patch5: clang-disable-ada-extension.patch
|
||||
# PATCH-FIX-UPSTREAM http://llvm.org/viewvc/llvm-project?view=rev&revision=147295
|
||||
Patch6: clang-pr11642.patch
|
||||
Patch3: clang-disable-ada-extension.patch
|
||||
# PATCH-FIX-OPENSUSE default-to-i586.patch -- Use i586 as default target for 32bit
|
||||
Patch7: default-to-i586.patch
|
||||
Patch4: default-to-i586.patch
|
||||
Patch5: clang-fix-mips-test.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
@ -49,15 +46,16 @@ BuildRequires: binutils-devel >= 2.21.90
|
||||
%endif
|
||||
BuildRequires: bison
|
||||
BuildRequires: chrpath
|
||||
BuildRequires: dejagnu
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: flex
|
||||
BuildRequires: gcc
|
||||
BuildRequires: gcc-c++
|
||||
%ifarch x86_64
|
||||
# For tests
|
||||
BuildRequires: glibc-devel-32bit
|
||||
%endif
|
||||
BuildRequires: libtool
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: tcl-devel
|
||||
BuildRequires: tk-devel
|
||||
BuildRequires: python
|
||||
|
||||
# Code10 does not have libffi
|
||||
%if 0%{?suse_version} > 1100
|
||||
@ -130,20 +128,23 @@ Requires: vim
|
||||
This package contains vim plugins for LLVM like syntax highlighting.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch1
|
||||
%patch3
|
||||
cd tools/clang
|
||||
%patch4
|
||||
%patch6
|
||||
cd ../..
|
||||
%setup -q -n %{name}
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%ifarch x86_64
|
||||
%patch5 -p1
|
||||
%patch7 -p1
|
||||
%endif
|
||||
|
||||
# We hardcode i586
|
||||
rm tools/clang/test/Driver/x86_features.c
|
||||
|
||||
sed -i s,SVN_REVISION,\"%{_revision}\",g tools/clang/lib/Basic/Version.cpp
|
||||
sed -i s,LLVM_REVISION,\"%{_revision}\",g tools/clang/lib/Basic/Version.cpp
|
||||
|
||||
# FIXME
|
||||
rm -rf projects/compiler_rt
|
||||
|
||||
# Nasty hardcoded path
|
||||
sed -i s,/lib/,/%{_lib}/,g tools/clang/lib/Driver/Tools.cpp
|
||||
|
@ -1,6 +1,8 @@
|
||||
--- tools/clang/lib/Basic/Version.cpp (revision 131788)
|
||||
+++ tools/clang/lib/Basic/Version.cpp (working copy)
|
||||
@@ -50,11 +50,7 @@
|
||||
Index: llvm/tools/clang/lib/Basic/Version.cpp
|
||||
===================================================================
|
||||
--- llvm.orig/tools/clang/lib/Basic/Version.cpp
|
||||
+++ llvm/tools/clang/lib/Basic/Version.cpp
|
||||
@@ -66,19 +66,11 @@ std::string getLLVMRepositoryPath() {
|
||||
}
|
||||
|
||||
std::string getClangRevision() {
|
||||
@ -11,4 +13,12 @@
|
||||
-#endif
|
||||
}
|
||||
|
||||
std::string getLLVMRevision() {
|
||||
-#ifdef LLVM_REVISION
|
||||
return LLVM_REVISION;
|
||||
-#else
|
||||
- return "";
|
||||
-#endif
|
||||
}
|
||||
|
||||
std::string getClangFullRepositoryVersion() {
|
||||
|
Loading…
Reference in New Issue
Block a user