Update to the LLVM 4.0 release branch

This commit is contained in:
Martin Storsjö authored and Martin Storsjo committed 2017-04-03 14:42:55 +03:00
1 parent 423f5a656a
commit 2504fdbd88
21 files changed
+89 -2129

No files matched your search

+12 -11
View File
@@ -1,7 +1,7 @@
From e809b3e41dd5d4ba55c1b941f2b4f72b408b4c2e Mon Sep 17 00:00:00 2001
From 23fe55b344184414deed5713cc3033e1706056aa Mon Sep 17 00:00:00 2001
From: Martell Malone <martellmalone@gmail.com>
Date: Tue, 9 Aug 2016 17:52:46 -0700
Subject: [PATCH 4/6] genlib: named as llvm-dlltool
Subject: [PATCH 1/3] genlib: named as llvm-dlltool
A PE COFF spec compliant import library generator.
Intended to be used with mingw-w64.
@@ -63,15 +63,16 @@ index 0000000..79fb7b7
+
+#endif
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index 9449421..03988a6 100644
index 7654954..bebb628 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -20,4 +20,5 @@ add_subdirectory(LineEditor)
@@ -21,5 +21,6 @@ add_subdirectory(LineEditor)
add_subdirectory(ProfileData)
add_subdirectory(Fuzzer)
add_subdirectory(Passes)
+add_subdirectory(DLLDriver)
add_subdirectory(LibDriver)
add_subdirectory(XRay)
diff --git a/lib/DLLDriver/CMakeLists.txt b/lib/DLLDriver/CMakeLists.txt
new file mode 100644
index 0000000..91fb2f0
@@ -1382,10 +1383,10 @@ index 0000000..62f33f3
+def out: JoinedOrSeparate<["-"], "o">, HelpText<"Set output file">;
+def dll: JoinedOrSeparate<["-"], "d">, HelpText<"Set dll name">;
diff --git a/lib/Object/ArchiveWriter.cpp b/lib/Object/ArchiveWriter.cpp
index 5357326..46b9d97 100644
index f8e3c5a..d5f067e 100644
--- a/lib/Object/ArchiveWriter.cpp
+++ b/lib/Object/ArchiveWriter.cpp
@@ -273,7 +273,8 @@ writeSymbolTable(raw_fd_ostream &Out, object::Archive::Kind Kind,
@@ -299,7 +299,8 @@ writeSymbolTable(raw_fd_ostream &Out, object::Archive::Kind Kind,
continue;
if (!(Symflags & object::SymbolRef::SF_Global))
continue;
@@ -1396,7 +1397,7 @@ index 5357326..46b9d97 100644
unsigned NameOffset = NameOS.tell();
diff --git a/tools/llvm-ar/CMakeLists.txt b/tools/llvm-ar/CMakeLists.txt
index 86233df..94cc205 100644
index 3bb0c8f..14732b4 100644
--- a/tools/llvm-ar/CMakeLists.txt
+++ b/tools/llvm-ar/CMakeLists.txt
@@ -1,6 +1,7 @@
@@ -1407,13 +1408,13 @@ index 86233df..94cc205 100644
LibDriver
Object
Support
@@ -12,3 +13,4 @@ add_llvm_tool(llvm-ar
@@ -15,3 +16,4 @@ add_llvm_tool(llvm-ar
add_llvm_tool_symlink(llvm-ranlib llvm-ar)
add_llvm_tool_symlink(llvm-lib llvm-ar)
+add_llvm_tool_symlink(llvm-dlltool llvm-ar)
diff --git a/tools/llvm-ar/llvm-ar.cpp b/tools/llvm-ar/llvm-ar.cpp
index 865152b..936c417 100644
index b99a396..23e323c 100644
--- a/tools/llvm-ar/llvm-ar.cpp
+++ b/tools/llvm-ar/llvm-ar.cpp
@@ -16,6 +16,7 @@
@@ -1424,7 +1425,7 @@ index 865152b..936c417 100644
#include "llvm/LibDriver/LibDriver.h"
#include "llvm/Object/Archive.h"
#include "llvm/Object/ArchiveWriter.h"
@@ -827,6 +828,9 @@ int main(int argc, char **argv) {
@@ -850,6 +851,9 @@ int main(int argc, char **argv) {
llvm::InitializeAllAsmParsers();
StringRef Stem = sys::path::stem(ToolName);
@@ -1434,7 +1435,7 @@ index 865152b..936c417 100644
if (Stem.find("ranlib") == StringRef::npos &&
Stem.find("lib") != StringRef::npos)
return libDriverMain(makeArrayRef(argv, argc));
@@ -842,5 +846,5 @@ int main(int argc, char **argv) {
@@ -865,5 +869,5 @@ int main(int argc, char **argv) {
return ranlib_main();
if (Stem.find("ar") != StringRef::npos)
return ar_main();