aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-11-27 06:44:18 +0000
committerBill Wendling <isanbard@gmail.com>2013-11-27 06:44:18 +0000
commit0ae07098f7d2ad5a1868d448d0b1b4eef2a3b091 (patch)
treee8e00fbae3c35abdbcfe8f7aacd1df44a0fe00b7 /lib/CodeGen
parentb1df5b013a38ab7381630af8b3142c56f604d85b (diff)
downloadexternal_llvm-0ae07098f7d2ad5a1868d448d0b1b4eef2a3b091.zip
external_llvm-0ae07098f7d2ad5a1868d448d0b1b4eef2a3b091.tar.gz
external_llvm-0ae07098f7d2ad5a1868d448d0b1b4eef2a3b091.tar.bz2
Merging r195148:
------------------------------------------------------------------------ r195148 | rafael | 2013-11-19 11:52:52 -0800 (Tue, 19 Nov 2013) | 15 lines Support multiple COFF sections with the same name but different COMDAT. This is the first step to fix pr17918. It extends the .section directive a bit, inspired by what the ELF one looks like. The problem with using linkonce is that given .section foo .linkonce.... .section foo .linkonce we would already have switched sections when getting to .linkonce. The cleanest solution seems to be to add the comdat information in the .section itself. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_34@195822 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/TargetLoweringObjectFileImpl.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
index 66ba3ec..59d7b57 100644
--- a/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
+++ b/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
@@ -733,6 +733,7 @@ getExplicitSectionGlobal(const GlobalValue *GV, SectionKind Kind,
return getContext().getCOFFSection(Name,
Characteristics,
Kind,
+ "",
Selection);
}
@@ -768,7 +769,7 @@ SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,
Characteristics |= COFF::IMAGE_SCN_LNK_COMDAT;
return getContext().getCOFFSection(Name.str(), Characteristics,
- Kind, COFF::IMAGE_COMDAT_SELECT_ANY);
+ Kind, "", COFF::IMAGE_COMDAT_SELECT_ANY);
}
if (Kind.isText())