• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1From 21b4a36988a3cd59fb40615eaec6d468d5045a1f Mon Sep 17 00:00:00 2001
2From: Andrew Hsieh <andrewhsieh@google.com>
3Date: Tue, 19 Mar 2013 10:35:10 -0700
4Subject: [PATCH 2/5] Compile agsint llvm 3.2
5
6Current mclinker needs LLVM -r 173175 which contains re-org of
7some headers from since LLVM 3.2.  This patch is to roll back
8so we can build from LLVM 3.2
9
10Change-Id: Iea929ae893269a6f7d5293e20b9641c917ec920b
11---
12 configure.ac                      | 2 +-
13 lib/CodeGen/MCLDTargetMachine.cpp | 2 +-
14 lib/CodeGen/MCLinker.cpp          | 2 +-
15 lib/Target/X86/X86Emulation.cpp   | 3 +--
16 lib/Target/X86/X86LDBackend.cpp   | 3 +--
17 tools/llvm-mcld/llvm-mcld.cpp     | 6 +++---
18 6 files changed, 8 insertions(+), 10 deletions(-)
19
20diff --git a/configure.ac b/configure.ac
21index c56d333..70fecd4 100644
22--- a/configure.ac
23+++ b/configure.ac
24@@ -101,7 +101,7 @@ AC_CHECK_HEADERS([sys/mman.h])
25
26 ####################
27 # Configure LLVM
28-CHECK_LLVM([3.3])
29+CHECK_LLVM([3.2])
30 ENUM_MCLD_TARGETS
31 CHECK_ALONE_TARGET
32
33diff --git a/lib/CodeGen/MCLDTargetMachine.cpp b/lib/CodeGen/MCLDTargetMachine.cpp
34index 57da5b5..9afadad 100644
35--- a/lib/CodeGen/MCLDTargetMachine.cpp
36+++ b/lib/CodeGen/MCLDTargetMachine.cpp
37@@ -26,7 +26,7 @@
38 #include <llvm/CodeGen/MachineModuleInfo.h>
39 #include <llvm/CodeGen/GCStrategy.h>
40 #include <llvm/CodeGen/Passes.h>
41-#include <llvm/IR/DataLayout.h>
42+#include <llvm/DataLayout.h>
43 #include <llvm/MC/MCAsmInfo.h>
44 #include <llvm/MC/MCStreamer.h>
45 #include <llvm/MC/MCInstrInfo.h>
46diff --git a/lib/CodeGen/MCLinker.cpp b/lib/CodeGen/MCLinker.cpp
47index 3613a03..909278f 100644
48--- a/lib/CodeGen/MCLinker.cpp
49+++ b/lib/CodeGen/MCLinker.cpp
50@@ -28,7 +28,7 @@
51 #include <mcld/Support/raw_ostream.h>
52 #include <mcld/Support/MemoryArea.h>
53
54-#include <llvm/IR/Module.h>
55+#include <llvm/Module.h>
56 #include <llvm/Support/CommandLine.h>
57
58 #include <algorithm>
59diff --git a/lib/Target/X86/X86Emulation.cpp b/lib/Target/X86/X86Emulation.cpp
60index 753d7cc..1e17b03 100644
61--- a/lib/Target/X86/X86Emulation.cpp
62+++ b/lib/Target/X86/X86Emulation.cpp
63@@ -23,8 +23,7 @@ static bool MCLDEmulateX86ELF(LinkerConfig& pConfig)
64   unsigned int bitclass;
65   Triple::ArchType arch = pConfig.targets().triple().getArch();
66   assert (arch == Triple::x86 || arch == Triple::x86_64);
67-  if (arch == Triple::x86 ||
68-      pConfig.targets().triple().getEnvironment() == Triple::GNUX32) {
69+  if (arch == Triple::x86) {
70     bitclass = 32;
71   }
72   else {
73diff --git a/lib/Target/X86/X86LDBackend.cpp b/lib/Target/X86/X86LDBackend.cpp
74index 87c1192..4001170 100644
75--- a/lib/Target/X86/X86LDBackend.cpp
76+++ b/lib/Target/X86/X86LDBackend.cpp
77@@ -46,8 +46,7 @@ X86GNULDBackend::X86GNULDBackend(const LinkerConfig& pConfig,
78 {
79   Triple::ArchType arch = pConfig.targets().triple().getArch();
80   assert (arch == Triple::x86 || arch == Triple::x86_64);
81-  if (arch == Triple::x86 ||
82-      pConfig.targets().triple().getEnvironment() == Triple::GNUX32) {
83+  if (arch == Triple::x86) {
84     m_RelEntrySize = 8;
85     m_RelaEntrySize = 12;
86     if (arch == Triple::x86)
87diff --git a/tools/llvm-mcld/llvm-mcld.cpp b/tools/llvm-mcld/llvm-mcld.cpp
88index 7a3a0c4..98bdcad 100644
89--- a/tools/llvm-mcld/llvm-mcld.cpp
90+++ b/tools/llvm-mcld/llvm-mcld.cpp
91@@ -25,9 +25,9 @@
92
93 #include <llvm/PassManager.h>
94 #include <llvm/Pass.h>
95-#include <llvm/IR/Module.h>
96-#include <llvm/IR/DataLayout.h>
97-#include <llvm/IR/LLVMContext.h>
98+#include <llvm/Module.h>
99+#include <llvm/DataLayout.h>
100+#include <llvm/LLVMContext.h>
101 #include <llvm/ADT/Triple.h>
102 #include <llvm/ADT/StringSwitch.h>
103 #include <llvm/MC/SubtargetFeature.h>
104--
1051.8.1.3
106
107