[PATCH] D36666: [ObjC] Use consistent comment style in inline asm
Oliver Stannard via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 14 02:35:58 PDT 2017
olista01 created this revision.
Herald added a subscriber: javed.absar.
The comment markers accepted by the assembler vary between different targets, but '//' is always accepted, so we should use that for consistency.
Repository:
rL LLVM
https://reviews.llvm.org/D36666
Files:
lib/CodeGen/TargetInfo.cpp
test/CodeGenObjC/arc-arm.m
Index: test/CodeGenObjC/arc-arm.m
===================================================================
--- test/CodeGenObjC/arc-arm.m
+++ test/CodeGenObjC/arc-arm.m
@@ -13,7 +13,7 @@
void test1(void) {
extern id test1_helper(void);
// CHECK: [[T0:%.*]] = call [[CC]]i8* @test1_helper()
- // CHECK-NEXT: call void asm sideeffect "mov
+ // CHECK-NEXT: call void asm sideeffect "mov\09{{fp, fp|r7, r7}}\09\09// marker for objc_retainAutoreleaseReturnValue"
// CHECK-NEXT: [[T1:%.*]] = call [[CC]]i8* @objc_retainAutoreleasedReturnValue(i8* [[T0]])
// CHECK-NEXT: store i8* [[T1]],
// CHECK-NEXT: call [[CC]]void @objc_storeStrong(
Index: lib/CodeGen/TargetInfo.cpp
===================================================================
--- lib/CodeGen/TargetInfo.cpp
+++ lib/CodeGen/TargetInfo.cpp
@@ -1085,7 +1085,7 @@
StringRef getARCRetainAutoreleasedReturnValueMarker() const override {
return "movl\t%ebp, %ebp"
- "\t\t## marker for objc_retainAutoreleaseReturnValue";
+ "\t\t// marker for objc_retainAutoreleaseReturnValue";
}
};
@@ -4880,7 +4880,7 @@
: TargetCodeGenInfo(new AArch64ABIInfo(CGT, Kind)) {}
StringRef getARCRetainAutoreleasedReturnValueMarker() const override {
- return "mov\tfp, fp\t\t# marker for objc_retainAutoreleaseReturnValue";
+ return "mov\tfp, fp\t\t// marker for objc_retainAutoreleaseReturnValue";
}
int getDwarfEHStackPointer(CodeGen::CodeGenModule &M) const override {
@@ -5486,7 +5486,7 @@
}
StringRef getARCRetainAutoreleasedReturnValueMarker() const override {
- return "mov\tr7, r7\t\t@ marker for objc_retainAutoreleaseReturnValue";
+ return "mov\tr7, r7\t\t// marker for objc_retainAutoreleaseReturnValue";
}
bool initDwarfEHRegSizeTable(CodeGen::CodeGenFunction &CGF,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36666.110927.patch
Type: text/x-patch
Size: 1811 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170814/270cc08e/attachment.bin>
More information about the cfe-commits
mailing list