mcstreamerize .no_dead_strip and .reference for static ctors/dtors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94290 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/MC/MCAsmInfo.cpp b/lib/MC/MCAsmInfo.cpp
index cc03614..ef6dd07 100644
--- a/lib/MC/MCAsmInfo.cpp
+++ b/lib/MC/MCAsmInfo.cpp
@@ -57,7 +57,7 @@
COMMDirectiveTakesAlignment = true;
HasDotTypeDotSizeDirective = true;
HasSingleParameterDotFile = true;
- UsedDirective = 0;
+ HasNoDeadStrip = false;
WeakRefDirective = 0;
WeakDefDirective = 0;
LinkOnceDirective = 0;
diff --git a/lib/MC/MCAsmInfoDarwin.cpp b/lib/MC/MCAsmInfoDarwin.cpp
index 664a55c..a66a83d 100644
--- a/lib/MC/MCAsmInfoDarwin.cpp
+++ b/lib/MC/MCAsmInfoDarwin.cpp
@@ -39,7 +39,7 @@
SetDirective = "\t.set";
ProtectedDirective = "\t.globl\t";
HasDotTypeDotSizeDirective = false;
- UsedDirective = "\t.no_dead_strip\t";
+ HasNoDeadStrip = true;
// Note: Even though darwin has the .lcomm directive, it is just a synonym for
// zerofill, so we prefer to use .zerofill.
diff --git a/lib/MC/MCMachOStreamer.cpp b/lib/MC/MCMachOStreamer.cpp
index ffdd421..4ed8ec3 100644
--- a/lib/MC/MCMachOStreamer.cpp
+++ b/lib/MC/MCMachOStreamer.cpp
@@ -234,6 +234,7 @@
case MCStreamer::Internal:
case MCStreamer::Protected:
case MCStreamer::Weak:
+ case MCStreamer::Local:
assert(0 && "Invalid symbol attribute for Mach-O!");
break;