aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm/include
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2014-12-25 18:22:22 +0000
committerDimitry Andric <dim@FreeBSD.org>2014-12-25 18:22:22 +0000
commit404df5bbd56fc05c3ba477243b27e87642c1d5e7 (patch)
treed99c35034a4055aa5391828a57312dcf1d90ee00 /contrib/llvm/include
parent42ac84b368aff9b219e058ef9c5c798740e8bcd7 (diff)
Notes
Diffstat (limited to 'contrib/llvm/include')
-rw-r--r--contrib/llvm/include/llvm/IR/Module.h10
-rw-r--r--contrib/llvm/include/llvm/MC/MCExpr.h1
-rw-r--r--contrib/llvm/include/llvm/Support/CodeGen.h4
-rw-r--r--contrib/llvm/include/llvm/Support/ELF.h3
4 files changed, 18 insertions, 0 deletions
diff --git a/contrib/llvm/include/llvm/IR/Module.h b/contrib/llvm/include/llvm/IR/Module.h
index 26f62db9db533..0b0f4ea3185a8 100644
--- a/contrib/llvm/include/llvm/IR/Module.h
+++ b/contrib/llvm/include/llvm/IR/Module.h
@@ -23,6 +23,7 @@
#include "llvm/IR/GlobalVariable.h"
#include "llvm/IR/Metadata.h"
#include "llvm/Support/CBindingWrapping.h"
+#include "llvm/Support/CodeGen.h"
#include "llvm/Support/DataTypes.h"
#include <system_error>
@@ -620,6 +621,15 @@ public:
unsigned getDwarfVersion() const;
/// @}
+/// @name Utility functions for querying and setting PIC level
+/// @{
+
+ /// \brief Returns the PIC level (small or large model)
+ PICLevel::Level getPICLevel() const;
+
+ /// \brief Set the PIC level (small or large model)
+ void setPICLevel(PICLevel::Level PL);
+/// @}
};
/// An raw_ostream inserter for modules.
diff --git a/contrib/llvm/include/llvm/MC/MCExpr.h b/contrib/llvm/include/llvm/MC/MCExpr.h
index e96ecb4be1759..163574eef55af 100644
--- a/contrib/llvm/include/llvm/MC/MCExpr.h
+++ b/contrib/llvm/include/llvm/MC/MCExpr.h
@@ -238,6 +238,7 @@ public:
VK_PPC_GOT_TLSLD_HI, // symbol@got@tlsld@h
VK_PPC_GOT_TLSLD_HA, // symbol@got@tlsld@ha
VK_PPC_TLSLD, // symbol@tlsld
+ VK_PPC_LOCAL, // symbol@local
VK_Mips_GPREL,
VK_Mips_GOT_CALL,
diff --git a/contrib/llvm/include/llvm/Support/CodeGen.h b/contrib/llvm/include/llvm/Support/CodeGen.h
index 240eba6c8a419..243f2dd7498c3 100644
--- a/contrib/llvm/include/llvm/Support/CodeGen.h
+++ b/contrib/llvm/include/llvm/Support/CodeGen.h
@@ -30,6 +30,10 @@ namespace llvm {
enum Model { Default, JITDefault, Small, Kernel, Medium, Large };
}
+ namespace PICLevel {
+ enum Level { Default=0, Small=1, Large=2 };
+ }
+
// TLS models.
namespace TLSModel {
enum Model {
diff --git a/contrib/llvm/include/llvm/Support/ELF.h b/contrib/llvm/include/llvm/Support/ELF.h
index 13394d331c2d3..ddc7ff8c47370 100644
--- a/contrib/llvm/include/llvm/Support/ELF.h
+++ b/contrib/llvm/include/llvm/Support/ELF.h
@@ -459,6 +459,8 @@ enum {
R_PPC_GOT16_HI = 16,
R_PPC_GOT16_HA = 17,
R_PPC_PLTREL24 = 18,
+ R_PPC_JMP_SLOT = 21,
+ R_PPC_LOCAL24PC = 23,
R_PPC_REL32 = 26,
R_PPC_TLS = 67,
R_PPC_DTPMOD32 = 68,
@@ -547,6 +549,7 @@ enum {
R_PPC64_GOT16_LO = 15,
R_PPC64_GOT16_HI = 16,
R_PPC64_GOT16_HA = 17,
+ R_PPC64_JMP_SLOT = 21,
R_PPC64_REL32 = 26,
R_PPC64_ADDR64 = 38,
R_PPC64_ADDR16_HIGHER = 39,