aboutsummaryrefslogtreecommitdiff
path: root/lib/MC/MCContext.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-05-07 21:49:09 +0000
committerChris Lattner <sabre@nondot.org>2010-05-07 21:49:09 +0000
commit6e5ce287b0e53c264af0ba37169ad964e19b5bb7 (patch)
tree8cdeb21cba6baeadca2bb4428765d0a584ea2af0 /lib/MC/MCContext.cpp
parent9c00487dc33b21061a5daf3ef9c2455715683f3f (diff)
add COFF support for COMDAT sections, patch by Nathan Jeffords!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103304 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCContext.cpp')
-rw-r--r--lib/MC/MCContext.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/MC/MCContext.cpp b/lib/MC/MCContext.cpp
index 93388c00f8..5a65b8ae38 100644
--- a/lib/MC/MCContext.cpp
+++ b/lib/MC/MCContext.cpp
@@ -126,8 +126,10 @@ getELFSection(StringRef Section, unsigned Type, unsigned Flags,
return Result;
}
-const MCSection *MCContext::
-getCOFFSection(StringRef Section, unsigned Flags, SectionKind Kind) {
+const MCSection *MCContext::getCOFFSection(StringRef Section,
+ unsigned Characteristics,
+ int Selection,
+ SectionKind Kind) {
if (COFFUniquingMap == 0)
COFFUniquingMap = new COFFUniqueMapTy();
COFFUniqueMapTy &Map = *(COFFUniqueMapTy*)COFFUniquingMap;
@@ -136,8 +138,9 @@ getCOFFSection(StringRef Section, unsigned Flags, SectionKind Kind) {
StringMapEntry<const MCSectionCOFF*> &Entry = Map.GetOrCreateValue(Section);
if (Entry.getValue()) return Entry.getValue();
- MCSectionCOFF *Result = new (*this) MCSectionCOFF(Entry.getKey(), Flags,
- Kind);
+ MCSectionCOFF *Result = new (*this) MCSectionCOFF(Entry.getKey(),
+ Characteristics,
+ Selection, Kind);
Entry.setValue(Result);
return Result;