Be sure to grab weak functions too, and make implicit defs comments
authorAndrew Lenharth <andrewl@lenharth.org>
Thu, 7 Dec 2006 17:39:14 +0000 (17:39 +0000)
committerAndrew Lenharth <andrewl@lenharth.org>
Thu, 7 Dec 2006 17:39:14 +0000 (17:39 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32308 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/Alpha/AlphaAsmPrinter.cpp
lib/Target/Alpha/AlphaInstrInfo.td

index 0f82b03cb1c762adb5cbb691ab3a264627a4209d..f4540dbe8f79cd15ded0224b7a9a40b0f000d671 100644 (file)
@@ -285,6 +285,13 @@ bool AlphaAsmPrinter::doFinalization(Module &M) {
       }
     }
 
+  for (Module::const_iterator I = M.begin(), E = M.end(); I != E; ++I)
+    if (I->hasExternalWeakLinkage()) {
+      O << "\n\n";
+      std::string name = Mang->getValueName(I);
+      O << "\t.weak " << name << "\n";
+    }
+
   AsmPrinter::doFinalization(M);
   return false;
 }
index c2919b0772592d82967ee62ef5ab5fa109c03c83..548dc02080b9946d7ade5eac74f71b9c0ede2a93 100644 (file)
@@ -140,11 +140,11 @@ class CmpOpFrag<dag res> : PatFrag<(ops node:$R), res>;
 
 //Pseudo ops for selection
 
-def IDEF_I : PseudoInstAlpha<(ops GPRC:$RA), "#idef $RA",
+def IDEF_I : PseudoInstAlpha<(ops GPRC:$RA), ";#idef $RA",
              [(set GPRC:$RA, (undef))], s_pseudo>;
-def IDEF_F32 : PseudoInstAlpha<(ops F4RC:$RA), "#idef $RA",
+def IDEF_F32 : PseudoInstAlpha<(ops F4RC:$RA), ";#idef $RA",
              [(set F4RC:$RA, (undef))], s_pseudo>;
-def IDEF_F64 : PseudoInstAlpha<(ops F8RC:$RA), "#idef $RA",
+def IDEF_F64 : PseudoInstAlpha<(ops F8RC:$RA), ";#idef $RA",
              [(set F8RC:$RA, (undef))], s_pseudo>;
 
 def WTF : PseudoInstAlpha<(ops variable_ops), "#wtf", [], s_pseudo>;