make -fno-rtti the default unless a directory builds with REQUIRES_RTTI.
[oota-llvm.git] / lib / Target / XCore / MCSectionXCore.cpp
1 //===- MCSectionXCore.cpp - XCore-specific section representation ---------===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file implements the MCSectionXCore class.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #include "MCSectionXCore.h"
15 #include "llvm/MC/MCContext.h"
16 #include "llvm/Support/raw_ostream.h"
17 using namespace llvm;
18
19 MCSectionXCore *
20 MCSectionXCore::Create(const StringRef &Section, unsigned Type,
21                        unsigned Flags, SectionKind K,
22                        bool isExplicit, MCContext &Ctx) {
23   return new (Ctx) MCSectionXCore(Section, Type, Flags, K, isExplicit);
24 }
25
26
27 /// PrintTargetSpecificSectionFlags - This handles the XCore-specific cp/dp
28 /// section flags.
29 void MCSectionXCore::PrintTargetSpecificSectionFlags(const MCAsmInfo &MAI,
30                                                      raw_ostream &OS) const {
31   if (getFlags() & MCSectionXCore::SHF_CP_SECTION)
32     OS << 'c';
33   if (getFlags() & MCSectionXCore::SHF_DP_SECTION)
34     OS << 'd';
35 }