- Update to r195116 from llvm 3.4 branch
- Refresh patches * aarch64-suse-support.patch * arm_suse_support.diff * assume-opensuse.patch * default-to-i586.patch - Drop upstream patches * llvm-disable-pretty-stack-trace.patch * r189852.diff * unreachable-code.patch OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm?expand=0&rev=287
This commit is contained in:
parent
e28977ca42
commit
359cf1e322
@ -1,16 +1,15 @@
|
||||
Index: llvm-3.3/tools/clang/lib/Driver/ToolChains.cpp
|
||||
Index: llvm/tools/clang/lib/Driver/ToolChains.cpp
|
||||
===================================================================
|
||||
--- llvm-3.3.orig/tools/clang/lib/Driver/ToolChains.cpp
|
||||
+++ llvm-3.3/tools/clang/lib/Driver/ToolChains.cpp
|
||||
@@ -1073,9 +1073,10 @@ Generic_GCC::GCCInstallationDetector::GC
|
||||
--- llvm.orig/tools/clang/lib/Driver/ToolChains.cpp
|
||||
+++ llvm/tools/clang/lib/Driver/ToolChains.cpp
|
||||
@@ -1110,8 +1110,9 @@ void Generic_GCC::GCCInstallationDetecto
|
||||
// Declare a bunch of static data sets that we'll select between below. These
|
||||
// are specifically designed to always refer to string literals to avoid any
|
||||
// lifetime or initialization issues.
|
||||
- static const char *const AArch64LibDirs[] = { "/lib" };
|
||||
+ static const char *const AArch64LibDirs[] = { "/lib64", "/lib" };
|
||||
static const char *const AArch64Triples[] = {
|
||||
"aarch64-none-linux-gnu",
|
||||
static const char *const AArch64Triples[] = { "aarch64-none-linux-gnu",
|
||||
+ "aarch64-suse-linux",
|
||||
"aarch64-linux-gnu"
|
||||
};
|
||||
"aarch64-linux-gnu" };
|
||||
|
||||
static const char *const ARMLibDirs[] = { "/lib" };
|
||||
|
@ -1,16 +1,18 @@
|
||||
--- /tools/clang/lib/Driver/ToolChains.cpp.orig 2012-11-22 10:26:49.202107824 +0100
|
||||
+++ /tools/clang/lib/Driver/ToolChains.cpp 2012-11-22 12:20:33.662825882 +0100
|
||||
@@ -1082,11 +1082,13 @@ Generic_GCC::GCCInstallationDetector::GC
|
||||
Index: llvm/tools/clang/lib/Driver/ToolChains.cpp
|
||||
===================================================================
|
||||
--- llvm.orig/tools/clang/lib/Driver/ToolChains.cpp
|
||||
+++ llvm/tools/clang/lib/Driver/ToolChains.cpp
|
||||
@@ -1071,9 +1071,11 @@ Generic_GCC::GCCInstallationDetector::GC
|
||||
|
||||
static const char *const ARMLibDirs[] = { "/lib" };
|
||||
static const char *const ARMTriples[] = {
|
||||
"arm-linux-gnueabi",
|
||||
+ "armv5tel-suse-linux-gnueabi",
|
||||
"arm-linux-androideabi"
|
||||
};
|
||||
static const char *const ARMHFTriples[] = {
|
||||
"arm-linux-gnueabihf",
|
||||
+ "armv7hl-suse-linux-gnueabi",
|
||||
"armv7hl-redhat-linux-gnueabi"
|
||||
};
|
||||
static const char *const ARMTriples[] = { "arm-linux-gnueabi",
|
||||
- "arm-linux-androideabi" };
|
||||
+ "arm-linux-androideabi",
|
||||
+ "armv5tel-suse-linux-gnueabi"};
|
||||
static const char *const ARMHFTriples[] = { "arm-linux-gnueabihf",
|
||||
- "armv7hl-redhat-linux-gnueabi" };
|
||||
+ "armv7hl-redhat-linux-gnueabi",
|
||||
+ "armv7hl-suse-linux-gnueabi" };
|
||||
|
||||
static const char *const X86_64LibDirs[] = { "/lib64", "/lib" };
|
||||
static const char *const X86_64Triples[] = {
|
||||
|
@ -1,11 +1,78 @@
|
||||
--- a/tools/clang/lib/Driver/ToolChains.cpp (revision 178453)
|
||||
+++ b/tools/clang/lib/Driver/ToolChains.cpp (working copy)
|
||||
@@ -1878,7 +1878,7 @@
|
||||
Index: llvm/tools/clang/lib/Driver/ToolChains.cpp
|
||||
===================================================================
|
||||
--- llvm.orig/tools/clang/lib/Driver/ToolChains.cpp
|
||||
+++ llvm/tools/clang/lib/Driver/ToolChains.cpp
|
||||
@@ -2185,73 +2185,7 @@ static bool IsUbuntu(enum Distro Distro)
|
||||
}
|
||||
|
||||
static bool IsOpenSuse(enum Distro Distro) {
|
||||
- return Distro >= OpenSuse11_3 && Distro <= OpenSuse12_2;
|
||||
+ return true;
|
||||
static Distro DetectDistro(llvm::Triple::ArchType Arch) {
|
||||
- OwningPtr<llvm::MemoryBuffer> File;
|
||||
- if (!llvm::MemoryBuffer::getFile("/etc/lsb-release", File)) {
|
||||
- StringRef Data = File.get()->getBuffer();
|
||||
- SmallVector<StringRef, 8> Lines;
|
||||
- Data.split(Lines, "\n");
|
||||
- Distro Version = UnknownDistro;
|
||||
- for (unsigned i = 0, s = Lines.size(); i != s; ++i)
|
||||
- if (Version == UnknownDistro && Lines[i].startswith("DISTRIB_CODENAME="))
|
||||
- Version = llvm::StringSwitch<Distro>(Lines[i].substr(17))
|
||||
- .Case("hardy", UbuntuHardy)
|
||||
- .Case("intrepid", UbuntuIntrepid)
|
||||
- .Case("jaunty", UbuntuJaunty)
|
||||
- .Case("karmic", UbuntuKarmic)
|
||||
- .Case("lucid", UbuntuLucid)
|
||||
- .Case("maverick", UbuntuMaverick)
|
||||
- .Case("natty", UbuntuNatty)
|
||||
- .Case("oneiric", UbuntuOneiric)
|
||||
- .Case("precise", UbuntuPrecise)
|
||||
- .Case("quantal", UbuntuQuantal)
|
||||
- .Case("raring", UbuntuRaring)
|
||||
- .Case("saucy", UbuntuSaucy)
|
||||
- .Case("trusty", UbuntuTrusty)
|
||||
- .Default(UnknownDistro);
|
||||
- return Version;
|
||||
- }
|
||||
-
|
||||
- if (!llvm::MemoryBuffer::getFile("/etc/redhat-release", File)) {
|
||||
- StringRef Data = File.get()->getBuffer();
|
||||
- if (Data.startswith("Fedora release"))
|
||||
- return Fedora;
|
||||
- else if (Data.startswith("Red Hat Enterprise Linux") &&
|
||||
- Data.find("release 6") != StringRef::npos)
|
||||
- return RHEL6;
|
||||
- else if ((Data.startswith("Red Hat Enterprise Linux") ||
|
||||
- Data.startswith("CentOS")) &&
|
||||
- Data.find("release 5") != StringRef::npos)
|
||||
- return RHEL5;
|
||||
- else if ((Data.startswith("Red Hat Enterprise Linux") ||
|
||||
- Data.startswith("CentOS")) &&
|
||||
- Data.find("release 4") != StringRef::npos)
|
||||
- return RHEL4;
|
||||
- return UnknownDistro;
|
||||
- }
|
||||
-
|
||||
- if (!llvm::MemoryBuffer::getFile("/etc/debian_version", File)) {
|
||||
- StringRef Data = File.get()->getBuffer();
|
||||
- if (Data[0] == '5')
|
||||
- return DebianLenny;
|
||||
- else if (Data.startswith("squeeze/sid") || Data[0] == '6')
|
||||
- return DebianSqueeze;
|
||||
- else if (Data.startswith("wheezy/sid") || Data[0] == '7')
|
||||
- return DebianWheezy;
|
||||
- else if (Data.startswith("jessie/sid") || Data[0] == '8')
|
||||
- return DebianJessie;
|
||||
- return UnknownDistro;
|
||||
- }
|
||||
-
|
||||
- if (llvm::sys::fs::exists("/etc/SuSE-release"))
|
||||
return OpenSUSE;
|
||||
-
|
||||
- if (llvm::sys::fs::exists("/etc/exherbo-release"))
|
||||
- return Exherbo;
|
||||
-
|
||||
- if (llvm::sys::fs::exists("/etc/arch-release"))
|
||||
- return ArchLinux;
|
||||
-
|
||||
- return UnknownDistro;
|
||||
}
|
||||
|
||||
static bool IsDebian(enum Distro Distro) {
|
||||
/// \brief Get our best guess at the multiarch triple for a target.
|
||||
|
@ -1,20 +1,24 @@
|
||||
Index: llvm-3.3/tools/clang/lib/Driver/Tools.cpp
|
||||
Index: llvm/tools/clang/lib/Driver/Tools.cpp
|
||||
===================================================================
|
||||
--- llvm-3.3.orig/tools/clang/lib/Driver/Tools.cpp
|
||||
+++ llvm-3.3/tools/clang/lib/Driver/Tools.cpp
|
||||
@@ -1243,12 +1243,12 @@ static const char *getX86TargetCPU(const
|
||||
if (Triple.getOSName().startswith("netbsd"))
|
||||
return "i486";
|
||||
--- llvm.orig/tools/clang/lib/Driver/Tools.cpp
|
||||
+++ llvm/tools/clang/lib/Driver/Tools.cpp
|
||||
@@ -1304,7 +1304,7 @@ static const char *getX86TargetCPU(const
|
||||
}
|
||||
|
||||
// All x86 devices running Android have core2 as their common
|
||||
- // denominator. This makes a better choice than pentium4.
|
||||
+ // denominator. This makes a better choice than i586.
|
||||
if (Triple.getEnvironment() == llvm::Triple::Android)
|
||||
return "core2";
|
||||
|
||||
@@ -1322,8 +1322,8 @@ static const char *getX86TargetCPU(const
|
||||
case llvm::Triple::Bitrig:
|
||||
return "i686";
|
||||
default:
|
||||
- // Fallback to p4.
|
||||
- return "pentium4";
|
||||
+ // Fallback to i586.
|
||||
+ return "i586";
|
||||
}
|
||||
}
|
||||
|
||||
void Clang::AddX86TargetArgs(const ArgList &Args,
|
||||
|
3
llvm-3.3.93.tar.bz2
Normal file
3
llvm-3.3.93.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d3da2976b481c69f53f6dc4fcb15292577c6d0d48b836b0dddac6816bd7e8e1f
|
||||
size 21986769
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:489179223491c39fc0274cab6540338bb0a6c18e581396d8b75341586181ade2
|
||||
size 24912910
|
@ -1,25 +0,0 @@
|
||||
Index: llvm-3.3/lib/Support/PrettyStackTrace.cpp
|
||||
===================================================================
|
||||
--- llvm-3.3.orig/lib/Support/PrettyStackTrace.cpp
|
||||
+++ llvm-3.3/lib/Support/PrettyStackTrace.cpp
|
||||
@@ -27,7 +27,7 @@
|
||||
using namespace llvm;
|
||||
|
||||
namespace llvm {
|
||||
- bool DisablePrettyStackTrace = false;
|
||||
+ bool DisablePrettyStackTrace = true;
|
||||
}
|
||||
|
||||
// FIXME: This should be thread local when llvm supports threads.
|
||||
Index: llvm-3.3/tools/clang/tools/driver/driver.cpp
|
||||
===================================================================
|
||||
--- llvm-3.3.orig/tools/clang/tools/driver/driver.cpp
|
||||
+++ llvm-3.3/tools/clang/tools/driver/driver.cpp
|
||||
@@ -341,6 +341,7 @@ static void ParseProgName(SmallVectorImp
|
||||
}
|
||||
|
||||
int main(int argc_, const char **argv_) {
|
||||
+ llvm::DisablePrettyStackTrace = false;
|
||||
llvm::sys::PrintStackTraceOnErrorSignal();
|
||||
llvm::PrettyStackTraceProgram X(argc_, argv_);
|
||||
|
14
llvm.changes
14
llvm.changes
@ -1,3 +1,17 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Nov 19 08:42:08 UTC 2013 - idonmez@suse.com
|
||||
|
||||
- Update to r195116 from llvm 3.4 branch
|
||||
- Refresh patches
|
||||
* aarch64-suse-support.patch
|
||||
* arm_suse_support.diff
|
||||
* assume-opensuse.patch
|
||||
* default-to-i586.patch
|
||||
- Drop upstream patches
|
||||
* llvm-disable-pretty-stack-trace.patch
|
||||
* r189852.diff
|
||||
* unreachable-code.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 22 20:57:00 UTC 2013 - dmueller@suse.com
|
||||
|
||||
|
42
llvm.spec
42
llvm.spec
@ -16,31 +16,17 @@
|
||||
#
|
||||
|
||||
|
||||
%define _revision 183898
|
||||
%define _release_version 3.3
|
||||
%define _supported_archs "AArch64;ARM;PowerPC;X86"
|
||||
%define _experimental_archs "R600"
|
||||
|
||||
%ifarch %arm
|
||||
%define _supported_archs "ARM"
|
||||
%endif
|
||||
|
||||
%ifarch ppc64
|
||||
%define _supported_archs "PowerPC"
|
||||
%endif
|
||||
|
||||
%ifarch s390x
|
||||
%define _supported_archs "SystemZ"
|
||||
%endif
|
||||
%define _revision 195116
|
||||
%define _release_version 3.4
|
||||
|
||||
Name: llvm
|
||||
Version: 3.3
|
||||
Version: 3.3.93
|
||||
Release: 0
|
||||
Summary: Low Level Virtual Machine
|
||||
License: NCSA
|
||||
Group: Development/Languages/Other
|
||||
Url: http://www.llvm.org
|
||||
Source0: %{name}-%{_release_version}.tar.bz2
|
||||
Source0: %{name}-%{version}.tar.bz2
|
||||
Source100: %{name}-rpmlintrc
|
||||
# PATCH-FIX-OPENSUSE set-revision.patch idoenmez@suse.de -- Allow us to set revision
|
||||
Patch1: set-revision.patch
|
||||
@ -53,17 +39,12 @@ Patch4: default-to-i586.patch
|
||||
Patch5: llvm-config-lib64.patch
|
||||
# PATCH-FIX-OPENSUSE arm_suse_support.diff --Enable ARM suse toolchain support
|
||||
Patch6: arm_suse_support.diff
|
||||
# PATCH-FIX-OPENSUSE unreachable-code.patch -- Unreachable code warning triggered on SLE
|
||||
Patch7: unreachable-code.patch
|
||||
Patch8: cmake-host-triple.patch
|
||||
# PATCH-FIX-OPENSUSE aarch64-suse-support.patch -- Enable AArch64 suse toolchain support
|
||||
Patch9: aarch64-suse-support.patch
|
||||
# PATCH-FIX-OPENSUSE llvm-no-visibility.patch -- Disable visibility
|
||||
Patch10: llvm-no-visibility.patch
|
||||
# PATCH-FIX-OPENSUSE llvm-disable-pretty-stack-trace.patch -- https://bugs.freedesktop.org/show_bug.cgi?id=60929
|
||||
Patch11: llvm-disable-pretty-stack-trace.patch
|
||||
Patch12: arm-remove-xfails.diff
|
||||
Patch13: r189852.diff
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
@ -160,7 +141,7 @@ Requires: vim
|
||||
This package contains vim plugins for LLVM like syntax highlighting.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{_release_version}
|
||||
%setup -q -n %{name}
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
@ -169,15 +150,12 @@ This package contains vim plugins for LLVM like syntax highlighting.
|
||||
%patch5 -p1
|
||||
%endif
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
%ifarch s390 s390x
|
||||
%patch10 -p1
|
||||
%endif
|
||||
%patch11 -p1
|
||||
%patch12
|
||||
%patch13
|
||||
|
||||
# We hardcode i586
|
||||
rm tools/clang/test/Driver/x86_features.c
|
||||
@ -251,7 +229,7 @@ cmake -G "Unix Makefiles" \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DLLVM_ENABLE_ASSERTIONS=OFF \
|
||||
-DLLVM_TARGETS_TO_BUILD=%{_supported_archs} \
|
||||
-DLLVM_TARGETS_TO_BUILD=host \
|
||||
-DCMAKE_C_FLAGS="-O0" \
|
||||
-DCMAKE_CXX_FLAGS="-O0" \
|
||||
-DLLVM_HOST_TRIPLE=%{host_triple} \
|
||||
@ -295,11 +273,11 @@ cmake -G "Unix Makefiles" \
|
||||
%if 0%{?suse_version} >= 1220
|
||||
-DLLVM_BINUTILS_INCDIR=/usr/include \
|
||||
%endif
|
||||
-DLLVM_TARGETS_TO_BUILD=%{_supported_archs} \
|
||||
%ifnarch %arm ppc64 s390x
|
||||
-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=%{_experimental_archs} \
|
||||
%ifarch %{ix86} x86_64
|
||||
-DLLVM_TARGETS_TO_BUILD="host;R600" \
|
||||
%else
|
||||
-DLLVM_TARGETS_TO_BUILD=host \
|
||||
%endif
|
||||
-DLLVM_BUILD_TESTS=OFF \
|
||||
..
|
||||
|
||||
make %{?_smp_mflags} VERBOSE=1
|
||||
|
188
r189852.diff
188
r189852.diff
@ -1,188 +0,0 @@
|
||||
|
||||
Don't emit an available_externally vtable pointing to linkonce_odr funcs.
|
||||
|
||||
This fixes pr13124.
|
||||
|
||||
From the discussion at
|
||||
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2012-June/022606.html
|
||||
we know that we cannot make funcions in a weak_odr vtable also weak_odr. They
|
||||
should remain linkonce_odr.
|
||||
|
||||
The side effect is that we cannot emit a available_externally vtable unless we
|
||||
also emit a copy of the function. This also has an issue: If codegen is going
|
||||
to output a function, sema has to mark it used. Given llvm.org/pr9114, it looks
|
||||
like sema cannot be more aggressive at marking functions used because
|
||||
of vtables.
|
||||
|
||||
This leaves us with a few unpleasant options:
|
||||
|
||||
* Marking functions in vtables used if possible. This sounds a bit sloppy, so
|
||||
we should avoid it.
|
||||
* Producing available_externally vtables only when all the functions in it are
|
||||
already used or weak_odr. This would cover cases like
|
||||
|
||||
--------------------
|
||||
struct foo {
|
||||
virtual ~foo();
|
||||
};
|
||||
struct bar : public foo {
|
||||
virtual void zed();
|
||||
};
|
||||
void f() {
|
||||
foo *x(new bar);
|
||||
delete x;
|
||||
}
|
||||
void g(bar *x) {
|
||||
x->~bar(); // force the destructor to be used
|
||||
}
|
||||
--------------------------
|
||||
|
||||
and
|
||||
|
||||
----------------------------------
|
||||
template<typename T>
|
||||
struct bar {
|
||||
virtual ~bar();
|
||||
};
|
||||
template<typename T>
|
||||
bar<T>::~bar() {
|
||||
}
|
||||
|
||||
// make the destructor weak_odr instead of linkonce_odr
|
||||
extern template class bar<int>;
|
||||
|
||||
void f() {
|
||||
bar<int> *x(new bar<int>);
|
||||
delete x;
|
||||
}
|
||||
----------------------------
|
||||
|
||||
These look like corner cases, so it is unclear if it is worth it.
|
||||
|
||||
* And finally: Just nuke this optimization. That is what this patch implements.
|
||||
|
||||
|
||||
--- tools/clang/lib/CodeGen/CGVTables.cpp
|
||||
+++ tools/clang/lib/CodeGen/CGVTables.cpp
|
||||
@@ -734,12 +734,7 @@
|
||||
switch (keyFunction->getTemplateSpecializationKind()) {
|
||||
case TSK_Undeclared:
|
||||
case TSK_ExplicitSpecialization:
|
||||
- // When compiling with optimizations turned on, we emit all vtables,
|
||||
- // even if the key function is not defined in the current translation
|
||||
- // unit. If this is the case, use available_externally linkage.
|
||||
- if (!def && CodeGenOpts.OptimizationLevel)
|
||||
- return llvm::GlobalVariable::AvailableExternallyLinkage;
|
||||
-
|
||||
+ assert(def && "Should not have been asked to emit this");
|
||||
if (keyFunction->isInlined())
|
||||
return !Context.getLangOpts().AppleKext ?
|
||||
llvm::GlobalVariable::LinkOnceODRLinkage :
|
||||
@@ -758,9 +753,7 @@
|
||||
llvm::Function::InternalLinkage;
|
||||
|
||||
case TSK_ExplicitInstantiationDeclaration:
|
||||
- return !Context.getLangOpts().AppleKext ?
|
||||
- llvm::GlobalVariable::AvailableExternallyLinkage :
|
||||
- llvm::Function::InternalLinkage;
|
||||
+ llvm_unreachable("Should not have been asked to emit this");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -776,7 +769,7 @@
|
||||
return llvm::GlobalVariable::LinkOnceODRLinkage;
|
||||
|
||||
case TSK_ExplicitInstantiationDeclaration:
|
||||
- return llvm::GlobalVariable::AvailableExternallyLinkage;
|
||||
+ llvm_unreachable("Should not have been asked to emit this");
|
||||
|
||||
case TSK_ExplicitInstantiationDefinition:
|
||||
return llvm::GlobalVariable::WeakODRLinkage;
|
||||
@@ -875,16 +868,6 @@
|
||||
/// we define that v-table?
|
||||
static bool shouldEmitVTableAtEndOfTranslationUnit(CodeGenModule &CGM,
|
||||
const CXXRecordDecl *RD) {
|
||||
- // If we're building with optimization, we always emit v-tables
|
||||
- // since that allows for virtual function calls to be devirtualized.
|
||||
- // If the v-table is defined strongly elsewhere, this definition
|
||||
- // will be emitted available_externally.
|
||||
- //
|
||||
- // However, we don't want to do this in -fapple-kext mode, because
|
||||
- // kext mode does not permit devirtualization.
|
||||
- if (CGM.getCodeGenOpts().OptimizationLevel && !CGM.getLangOpts().AppleKext)
|
||||
- return true;
|
||||
-
|
||||
return !CGM.getVTables().isVTableExternal(RD);
|
||||
}
|
||||
|
||||
--- tools/clang/test/CodeGenCXX/thunks-available-externally.cpp
|
||||
+++ tools/clang/test/CodeGenCXX/thunks-available-externally.cpp
|
||||
@@ -1,4 +1,4 @@
|
||||
-// RUN: %clang_cc1 %s -I%S -triple=x86_64-apple-darwin10 -emit-llvm -O3 -o - | FileCheck %s
|
||||
+// RUN: %clang_cc1 %s -I%S -triple=x86_64-apple-darwin10 -emit-llvm-only -O3
|
||||
|
||||
// Check that we don't assert on this case.
|
||||
namespace Test1 {
|
||||
@@ -58,15 +58,6 @@
|
||||
b->f();
|
||||
}
|
||||
|
||||
-// CHECK: define void @_ZN5Test21fEv()
|
||||
-// CHECK: call void @_ZN5Test21C1fEv
|
||||
-// CHECK: ret void
|
||||
-// CHECK: define available_externally void @_ZThn16_N5Test21C1fEv
|
||||
-void f() {
|
||||
- C c;
|
||||
- f(&c);
|
||||
-}
|
||||
-
|
||||
}
|
||||
|
||||
// Test that we don't assert.
|
||||
--- tools/clang/test/CodeGenCXX/vtable-available-externally.cpp
|
||||
+++ tools/clang/test/CodeGenCXX/vtable-available-externally.cpp
|
||||
@@ -2,18 +2,10 @@
|
||||
// RUN: FileCheck --check-prefix=CHECK-TEST1 %s < %t
|
||||
// RUN: FileCheck --check-prefix=CHECK-TEST2 %s < %t
|
||||
// RUN: FileCheck --check-prefix=CHECK-TEST5 %s < %t
|
||||
-// RUN: FileCheck --check-prefix=CHECK-TEST7 %s < %t
|
||||
|
||||
#include <typeinfo>
|
||||
|
||||
-// Test1::A's key function (f) is not defined in this translation
|
||||
-// unit, but in order to devirtualize calls, we emit the v-table with
|
||||
-// available_externally linkage.
|
||||
-//
|
||||
-// There's no real reason to do this to the RTTI, though.
|
||||
-
|
||||
-// CHECK-TEST1: @_ZTVN5Test11AE = available_externally
|
||||
-// CHECK-TEST1: @_ZTIN5Test11AE = external constant i8*
|
||||
+// CHECK-TEST1: @_ZTVN5Test11AE = external unnamed_addr constant
|
||||
namespace Test1 {
|
||||
|
||||
struct A {
|
||||
@@ -160,13 +152,4 @@
|
||||
void f6 ();
|
||||
};
|
||||
|
||||
-// CHECK-TEST7: define void @_ZN5Test79check_c28Ev
|
||||
-// CHECK-TEST7: call void @_ZN5Test73c282f6Ev
|
||||
-// CHECK-TEST7: ret void
|
||||
-void check_c28 () {
|
||||
- c28 obj;
|
||||
- c11 *ptr = &obj;
|
||||
- ptr->f6 ();
|
||||
-}
|
||||
-
|
||||
}
|
||||
--- tools/clang/test/CodeGenCXX/vtable-linkage.cpp
|
||||
+++ tools/clang/test/CodeGenCXX/vtable-linkage.cpp
|
||||
@@ -163,7 +163,7 @@
|
||||
// F<int> is an explicit template instantiation declaration without a
|
||||
// key function, so its vtable should have external linkage.
|
||||
// CHECK-9: @_ZTV1FIiE = external unnamed_addr constant
|
||||
-// CHECK-9-OPT: @_ZTV1FIiE = available_externally unnamed_addr constant
|
||||
+// CHECK-9-OPT: @_ZTV1FIiE = external unnamed_addr constant
|
||||
|
||||
// E<int> is an explicit template instantiation declaration. It has a
|
||||
// key function that is not instantiated, so we should only reference
|
@ -1,13 +0,0 @@
|
||||
Index: llvm/utils/TableGen/CodeGenInstruction.cpp
|
||||
===================================================================
|
||||
--- llvm.orig/utils/TableGen/CodeGenInstruction.cpp
|
||||
+++ llvm/utils/TableGen/CodeGenInstruction.cpp
|
||||
@@ -191,7 +191,7 @@ CGIOperandList::ParseOperandName(const s
|
||||
return std::make_pair(OpIdx, i);
|
||||
|
||||
// Otherwise, didn't find it!
|
||||
- PrintFatalError(TheDef->getName() + ": unknown suboperand name in '" + Op + "'");
|
||||
+ llvm_unreachable(TheDef->getName() + ": unknown suboperand name in '" + Op + "'");
|
||||
}
|
||||
|
||||
static void ParseConstraint(const std::string &CStr, CGIOperandList &Ops) {
|
Loading…
x
Reference in New Issue
Block a user