It's not legal to output a GV in a coalesced section if it's used in an ARM PIC relative constantpool.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54519 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/TargetAsmInfo.cpp b/lib/Target/TargetAsmInfo.cpp
index 9bc0b40..cf43112 100644
--- a/lib/Target/TargetAsmInfo.cpp
+++ b/lib/Target/TargetAsmInfo.cpp
@@ -272,7 +272,7 @@
}
std::string
-TargetAsmInfo::SectionForGlobal(const GlobalValue *GV) const {
+TargetAsmInfo::SectionForGlobal(const GlobalValue *GV, bool NoCoalesce) const {
const Section* S;
// Select section name
if (GV->hasSection()) {
@@ -282,7 +282,7 @@
S = getNamedSection(GV->getSection().c_str(), Flags);
} else {
// Use default section depending on the 'type' of global
- S = SelectSectionForGlobal(GV);
+ S = SelectSectionForGlobal(GV, NoCoalesce);
}
if (!S->isNamed())
@@ -295,8 +295,8 @@
}
// Lame default implementation. Calculate the section name for global.
-const Section*
-TargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV) const {
+const Section* TargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV,
+ bool NoCoalesce) const {
SectionKind::Kind Kind = SectionKindForGlobal(GV);
if (GV->isWeakForLinker()) {