Change the asmprinter to print the comment character before the
"inlineasmstart/end" strings so that the contents of the directive
are separate from the comment character. This lets elf targets
get #APP/#NOAPP for free even if they don't use "#" as the comment
character. This also allows hoisting the darwin stuff up to the
shared TAI class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78737 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/ARM/ARMTargetAsmInfo.cpp b/lib/Target/ARM/ARMTargetAsmInfo.cpp
index 85e9d64..0c3df82 100644
--- a/lib/Target/ARM/ARMTargetAsmInfo.cpp
+++ b/lib/Target/ARM/ARMTargetAsmInfo.cpp
@@ -45,9 +45,6 @@
Data64bitsDirective = 0;
CommentString = "@";
COMMDirectiveTakesAlignment = false;
- InlineAsmStart = "@ InlineAsm Start";
- InlineAsmEnd = "@ InlineAsm End";
-
SupportsDebugInformation = true;
// Exceptions handling
@@ -60,8 +57,6 @@
Data64bitsDirective = 0;
CommentString = "@";
COMMDirectiveTakesAlignment = false;
- InlineAsmStart = "@ InlineAsm Start";
- InlineAsmEnd = "@ InlineAsm End";
NeedsSet = false;
HasLEB128 = true;
diff --git a/lib/Target/Blackfin/BlackfinTargetAsmInfo.cpp b/lib/Target/Blackfin/BlackfinTargetAsmInfo.cpp
index 8dcb44b..3ab02d8 100644
--- a/lib/Target/Blackfin/BlackfinTargetAsmInfo.cpp
+++ b/lib/Target/Blackfin/BlackfinTargetAsmInfo.cpp
@@ -18,6 +18,4 @@
BlackfinTargetAsmInfo::BlackfinTargetAsmInfo() {
GlobalPrefix = "_";
CommentString = "//";
- InlineAsmStart = "// APP";
- InlineAsmEnd = "// NO_APP";
}
diff --git a/lib/Target/CellSPU/SPUTargetAsmInfo.cpp b/lib/Target/CellSPU/SPUTargetAsmInfo.cpp
index 991afa0..a295a4c 100644
--- a/lib/Target/CellSPU/SPUTargetAsmInfo.cpp
+++ b/lib/Target/CellSPU/SPUTargetAsmInfo.cpp
@@ -20,8 +20,6 @@
Data64bitsDirective = "\t.quad\t";
AlignmentIsInBytes = false;
LCOMMDirective = "\t.lcomm\t";
- InlineAsmStart = "# InlineAsm Start";
- InlineAsmEnd = "# InlineAsm End";
PCSymbol = ".";
CommentString = "#";
diff --git a/lib/Target/DarwinTargetAsmInfo.cpp b/lib/Target/DarwinTargetAsmInfo.cpp
index 08ad76d..c37b41b 100644
--- a/lib/Target/DarwinTargetAsmInfo.cpp
+++ b/lib/Target/DarwinTargetAsmInfo.cpp
@@ -27,6 +27,8 @@
HasSingleParameterDotFile = false;
AlignmentIsInBytes = false;
+ InlineAsmStart = " InlineAsm Start";
+ InlineAsmEnd = " InlineAsm End";
// In non-PIC modes, emit a special label before jump tables so that the
// linker can perform more accurate dead code stripping. We do not check the
diff --git a/lib/Target/PowerPC/PPCTargetAsmInfo.cpp b/lib/Target/PowerPC/PPCTargetAsmInfo.cpp
index 58926e3..891252b 100644
--- a/lib/Target/PowerPC/PPCTargetAsmInfo.cpp
+++ b/lib/Target/PowerPC/PPCTargetAsmInfo.cpp
@@ -29,8 +29,6 @@
if (!isPPC64)
Data64bitsDirective = 0; // we can't emit a 64-bit unit
- InlineAsmStart = "# InlineAsm Start";
- InlineAsmEnd = "# InlineAsm End";
AssemblerDialect = Subtarget->getAsmFlavor();
}
@@ -63,8 +61,6 @@
Data64bitsDirective = isPPC64 ? "\t.quad\t" : 0;
AlignmentIsInBytes = false;
LCOMMDirective = "\t.lcomm\t";
- InlineAsmStart = "# InlineAsm Start";
- InlineAsmEnd = "# InlineAsm End";
AssemblerDialect = Subtarget->getAsmFlavor();
}
diff --git a/lib/Target/TargetAsmInfo.cpp b/lib/Target/TargetAsmInfo.cpp
index 51aeae4..253d72c 100644
--- a/lib/Target/TargetAsmInfo.cpp
+++ b/lib/Target/TargetAsmInfo.cpp
@@ -37,8 +37,8 @@
PersonalityPrefix = "";
PersonalitySuffix = "";
NeedsIndirectEncoding = false;
- InlineAsmStart = "#APP";
- InlineAsmEnd = "#NO_APP";
+ InlineAsmStart = "APP";
+ InlineAsmEnd = "NO_APP";
AssemblerDialect = 0;
AllowQuotesInName = false;
ZeroDirective = "\t.zero\t";
diff --git a/lib/Target/X86/X86TargetAsmInfo.cpp b/lib/Target/X86/X86TargetAsmInfo.cpp
index a07b2cc..1d9a4c2 100644
--- a/lib/Target/X86/X86TargetAsmInfo.cpp
+++ b/lib/Target/X86/X86TargetAsmInfo.cpp
@@ -61,8 +61,6 @@
PersonalitySuffix = "$non_lazy_ptr";
}
- InlineAsmStart = "## InlineAsm Start";
- InlineAsmEnd = "## InlineAsm End";
CommentString = "##";
PCSymbol = ".";
@@ -113,9 +111,6 @@
GlobalPrefix = "_";
CommentString = ";";
- InlineAsmStart = "; InlineAsm Start";
- InlineAsmEnd = "; InlineAsm End";
-
PrivateGlobalPrefix = "$";
AlignDirective = "\tALIGN\t";
ZeroDirective = "\tdb\t";