LLVM API Documentation
00001 //===- MCSectionXCore.cpp - XCore-specific section representation ---------===// 00002 // 00003 // The LLVM Compiler Infrastructure 00004 // 00005 // This file is distributed under the University of Illinois Open Source 00006 // License. See LICENSE.TXT for details. 00007 // 00008 //===----------------------------------------------------------------------===// 00009 // 00010 // This file implements the MCSectionXCore class. 00011 // 00012 //===----------------------------------------------------------------------===// 00013 00014 #include "MCSectionXCore.h" 00015 #include "llvm/MC/MCContext.h" 00016 #include "llvm/Support/raw_ostream.h" 00017 using namespace llvm; 00018 00019 MCSectionXCore * 00020 MCSectionXCore::Create(const StringRef &Section, unsigned Type, 00021 unsigned Flags, SectionKind K, 00022 bool isExplicit, MCContext &Ctx) { 00023 return new (Ctx) MCSectionXCore(Section, Type, Flags, K, isExplicit); 00024 } 00025 00026 00027 /// PrintTargetSpecificSectionFlags - This handles the XCore-specific cp/dp 00028 /// section flags. 00029 void MCSectionXCore::PrintTargetSpecificSectionFlags(const TargetAsmInfo &TAI, 00030 raw_ostream &OS) const { 00031 if (getFlags() & MCSectionXCore::SHF_CP_SECTION) 00032 OS << 'c'; 00033 if (getFlags() & MCSectionXCore::SHF_DP_SECTION) 00034 OS << 'd'; 00035 }