summaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-01-23 06:39:22 +0000
committerChris Lattner <sabre@nondot.org>2010-01-23 06:39:22 +0000
commita5ad93a10a5435f21090b09edb6b3a7e44967648 (patch)
treeef70d3d7e9c5622f26c42d8cda83e5abfe0af76c /lib/CodeGen
parent52492ac0d03aa86b07ad889b69b0ba38ffec8011 (diff)
downloadllvm-a5ad93a10a5435f21090b09edb6b3a7e44967648.tar.gz
llvm-a5ad93a10a5435f21090b09edb6b3a7e44967648.tar.bz2
llvm-a5ad93a10a5435f21090b09edb6b3a7e44967648.tar.xz
move the various directive enums out of the MCStreamer class
into a new MCDirectives.h file. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94294 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/AsmPrinter/AsmPrinter.cpp28
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfException.cpp4
2 files changed, 16 insertions, 16 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 6cdeb3bc0e..d27051390f 100644
--- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -203,7 +203,7 @@ void AsmPrinter::EmitGlobalVariable(const GlobalVariable *GV) {
}
// .local _foo
- OutStreamer.EmitSymbolAttribute(GVSym, MCStreamer::Local);
+ OutStreamer.EmitSymbolAttribute(GVSym, MCSA_Local);
// .comm _foo, 42, 4
OutStreamer.EmitCommonSymbol(GVSym, Size, 1 << AlignLog);
return;
@@ -216,7 +216,7 @@ void AsmPrinter::EmitGlobalVariable(const GlobalVariable *GV) {
// emission.
if (GVKind.isBSSExtern() && MAI->hasMachoZeroFillDirective()) {
// .globl _foo
- OutStreamer.EmitSymbolAttribute(GVSym, MCStreamer::Global);
+ OutStreamer.EmitSymbolAttribute(GVSym, MCSA_Global);
// .zerofill __DATA, __common, _foo, 400, 5
OutStreamer.EmitZerofill(TheSection, GVSym, Size, 1 << AlignLog);
return;
@@ -235,17 +235,17 @@ void AsmPrinter::EmitGlobalVariable(const GlobalVariable *GV) {
case GlobalValue::LinkerPrivateLinkage:
if (MAI->getWeakDefDirective() != 0) {
// .globl _foo
- OutStreamer.EmitSymbolAttribute(GVSym, MCStreamer::Global);
+ OutStreamer.EmitSymbolAttribute(GVSym, MCSA_Global);
// .weak_definition _foo
- OutStreamer.EmitSymbolAttribute(GVSym, MCStreamer::WeakDefinition);
+ OutStreamer.EmitSymbolAttribute(GVSym, MCSA_WeakDefinition);
} else if (const char *LinkOnce = MAI->getLinkOnceDirective()) {
// .globl _foo
- OutStreamer.EmitSymbolAttribute(GVSym, MCStreamer::Global);
+ OutStreamer.EmitSymbolAttribute(GVSym, MCSA_Global);
// .linkonce same_size
O << LinkOnce;
} else {
// .weak _foo
- OutStreamer.EmitSymbolAttribute(GVSym, MCStreamer::Weak);
+ OutStreamer.EmitSymbolAttribute(GVSym, MCSA_Weak);
}
break;
case GlobalValue::DLLExportLinkage:
@@ -255,7 +255,7 @@ void AsmPrinter::EmitGlobalVariable(const GlobalVariable *GV) {
case GlobalValue::ExternalLinkage:
// If external or appending, declare as a global symbol.
// .globl _foo
- OutStreamer.EmitSymbolAttribute(GVSym, MCStreamer::Global);
+ OutStreamer.EmitSymbolAttribute(GVSym, MCSA_Global);
break;
case GlobalValue::PrivateLinkage:
case GlobalValue::InternalLinkage:
@@ -303,13 +303,13 @@ bool AsmPrinter::doFinalization(Module &M) {
I != E; ++I) {
if (!I->hasExternalWeakLinkage()) continue;
OutStreamer.EmitSymbolAttribute(GetGlobalValueSymbol(I),
- MCStreamer::WeakReference);
+ MCSA_WeakReference);
}
for (Module::const_iterator I = M.begin(), E = M.end(); I != E; ++I) {
if (!I->hasExternalWeakLinkage()) continue;
OutStreamer.EmitSymbolAttribute(GetGlobalValueSymbol(I),
- MCStreamer::WeakReference);
+ MCSA_WeakReference);
}
}
@@ -323,9 +323,9 @@ bool AsmPrinter::doFinalization(Module &M) {
MCSymbol *Target = GetGlobalValueSymbol(GV);
if (I->hasExternalLinkage() || !MAI->getWeakRefDirective())
- OutStreamer.EmitSymbolAttribute(Name, MCStreamer::Global);
+ OutStreamer.EmitSymbolAttribute(Name, MCSA_Global);
else if (I->hasWeakLinkage())
- OutStreamer.EmitSymbolAttribute(Name, MCStreamer::WeakReference);
+ OutStreamer.EmitSymbolAttribute(Name, MCSA_WeakReference);
else
assert(I->hasLocalLinkage() && "Invalid alias linkage");
@@ -601,7 +601,7 @@ bool AsmPrinter::EmitSpecialLLVMGlobal(const GlobalVariable *GV) {
MAI->hasStaticCtorDtorReferenceInStaticMode()) {
StringRef Sym(".constructors_used");
OutStreamer.EmitSymbolAttribute(OutContext.GetOrCreateSymbol(Sym),
- MCStreamer::Reference);
+ MCSA_Reference);
}
return true;
}
@@ -615,7 +615,7 @@ bool AsmPrinter::EmitSpecialLLVMGlobal(const GlobalVariable *GV) {
MAI->hasStaticCtorDtorReferenceInStaticMode()) {
StringRef Sym(".destructors_used");
OutStreamer.EmitSymbolAttribute(OutContext.GetOrCreateSymbol(Sym),
- MCStreamer::Reference);
+ MCSA_Reference);
}
return true;
}
@@ -636,7 +636,7 @@ void AsmPrinter::EmitLLVMUsedList(Constant *List) {
dyn_cast<GlobalValue>(InitList->getOperand(i)->stripPointerCasts());
if (GV && getObjFileLowering().shouldEmitUsedDirectiveFor(GV, Mang))
OutStreamer.EmitSymbolAttribute(GetGlobalValueSymbol(GV),
- MCStreamer::NoDeadStrip);
+ MCSA_NoDeadStrip);
}
}
diff --git a/lib/CodeGen/AsmPrinter/DwarfException.cpp b/lib/CodeGen/AsmPrinter/DwarfException.cpp
index 1b72f73fb1..fd3dbf5cf1 100644
--- a/lib/CodeGen/AsmPrinter/DwarfException.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfException.cpp
@@ -247,7 +247,7 @@ void DwarfException::EmitFDE(const FunctionEHFrameInfo &EHFrameInfo) {
// dead-stripping unconditionally.
if (MAI->hasNoDeadStrip())
Asm->OutStreamer.EmitSymbolAttribute(EHFrameInfo.FunctionEHSym,
- MCStreamer::NoDeadStrip);
+ MCSA_NoDeadStrip);
} else {
O << *EHFrameInfo.FunctionEHSym << ":\n";
@@ -316,7 +316,7 @@ void DwarfException::EmitFDE(const FunctionEHFrameInfo &EHFrameInfo) {
if (MMI->isUsedFunction(EHFrameInfo.function))
if (MAI->hasNoDeadStrip())
Asm->OutStreamer.EmitSymbolAttribute(EHFrameInfo.FunctionEHSym,
- MCStreamer::NoDeadStrip);
+ MCSA_NoDeadStrip);
}
Asm->O << '\n';
}