aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Target/Alpha/AlphaTargetAsmInfo.cpp7
-rw-r--r--lib/Target/Alpha/AlphaTargetAsmInfo.h2
2 files changed, 8 insertions, 1 deletions
diff --git a/lib/Target/Alpha/AlphaTargetAsmInfo.cpp b/lib/Target/Alpha/AlphaTargetAsmInfo.cpp
index 61fcf83385..6092ab67b5 100644
--- a/lib/Target/Alpha/AlphaTargetAsmInfo.cpp
+++ b/lib/Target/Alpha/AlphaTargetAsmInfo.cpp
@@ -16,7 +16,7 @@
using namespace llvm;
-AlphaTargetAsmInfo::AlphaTargetAsmInfo(const AlphaTargetMachine &TM)
+AlphaTargetAsmInfo::AlphaTargetAsmInfo(const AlphaTargetMachine &TM)
: TargetAsmInfo(TM) {
AlignmentIsInBytes = false;
PrivateGlobalPrefix = "$";
@@ -24,3 +24,8 @@ AlphaTargetAsmInfo::AlphaTargetAsmInfo(const AlphaTargetMachine &TM)
JumpTableDataSection = "\t.section .rodata\n";
WeakRefDirective = "\t.weak\t";
}
+
+unsigned AlphaTargetAsmInfo::RelocBehaviour() const {
+ return (TM.getRelocationModel() != Reloc::Static ?
+ Reloc::LocalOrGlobal : Reloc::Global);
+}
diff --git a/lib/Target/Alpha/AlphaTargetAsmInfo.h b/lib/Target/Alpha/AlphaTargetAsmInfo.h
index 0b50de858f..7675b26f6e 100644
--- a/lib/Target/Alpha/AlphaTargetAsmInfo.h
+++ b/lib/Target/Alpha/AlphaTargetAsmInfo.h
@@ -23,6 +23,8 @@ namespace llvm {
struct AlphaTargetAsmInfo : public TargetAsmInfo {
explicit AlphaTargetAsmInfo(const AlphaTargetMachine &TM);
+
+ virtual unsigned RelocBehaviour() const;
};
} // namespace llvm