Reapply 56585:56589 with proper fix for some gcc versions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56621 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/PowerPC/PPCTargetAsmInfo.cpp b/lib/Target/PowerPC/PPCTargetAsmInfo.cpp
index 6988e78..717ddd6 100644
--- a/lib/Target/PowerPC/PPCTargetAsmInfo.cpp
+++ b/lib/Target/PowerPC/PPCTargetAsmInfo.cpp
@@ -19,21 +19,10 @@
 using namespace llvm;
 using namespace llvm::dwarf;
 
-PPCTargetAsmInfo::PPCTargetAsmInfo(const PPCTargetMachine &TM) {
-  bool isPPC64 = TM.getSubtargetImpl()->isPPC64();
-
-  ZeroDirective = "\t.space\t";
-  SetDirective = "\t.set";
-  Data64bitsDirective = isPPC64 ? "\t.quad\t" : 0;  
-  AlignmentIsInBytes = false;
-  LCOMMDirective = "\t.lcomm\t";
-  InlineAsmStart = "# InlineAsm Start";
-  InlineAsmEnd = "# InlineAsm End";
-  AssemblerDialect = TM.getSubtargetImpl()->getAsmFlavor();
-}
+TEMPLATE_INSTANTIATION(class PPCTargetAsmInfo<TargetAsmInfo>);
 
 PPCDarwinTargetAsmInfo::PPCDarwinTargetAsmInfo(const PPCTargetMachine &TM):
-  PPCTargetAsmInfo(TM), DarwinTargetAsmInfo(TM) {
+  PPCTargetAsmInfo<DarwinTargetAsmInfo>(TM) {
   PCSymbol = ".";
   CommentString = ";";
   GlobalPrefix = "_";
@@ -103,7 +92,7 @@
 
 
 PPCLinuxTargetAsmInfo::PPCLinuxTargetAsmInfo(const PPCTargetMachine &TM) :
-  PPCTargetAsmInfo(TM), ELFTargetAsmInfo(TM) {
+  PPCTargetAsmInfo<ELFTargetAsmInfo>(TM) {
   CommentString = "#";
   GlobalPrefix = "";
   PrivateGlobalPrefix = "";