summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/BackendUtil.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp
index ca7aec0ba81..7133bda99a1 100644
--- a/clang/lib/CodeGen/BackendUtil.cpp
+++ b/clang/lib/CodeGen/BackendUtil.cpp
@@ -525,6 +525,12 @@ void EmitAssemblyHelper::CreateTargetMachine(bool MustCreateTM) {
RM = llvm::Reloc::Static;
} else if (CodeGenOpts.RelocationModel == "pic") {
RM = llvm::Reloc::PIC_;
+ } else if (CodeGenOpts.RelocationModel == "ropi") {
+ RM = llvm::Reloc::ROPI;
+ } else if (CodeGenOpts.RelocationModel == "rwpi") {
+ RM = llvm::Reloc::RWPI;
+ } else if (CodeGenOpts.RelocationModel == "ropi-rwpi") {
+ RM = llvm::Reloc::ROPI_RWPI;
} else {
assert(CodeGenOpts.RelocationModel == "dynamic-no-pic" &&
"Invalid PIC model!");
OpenPOWER on IntegriCloud