[llvm] r272588 - Update the AArch64ExternalSymbolizer to print literal strings as escaped strings
Kevin Enderby via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 13 14:08:57 PDT 2016
Author: enderby
Date: Mon Jun 13 16:08:57 2016
New Revision: 272588
URL: http://llvm.org/viewvc/llvm-project?rev=272588&view=rev
Log:
Update the AArch64ExternalSymbolizer to print literal strings as escaped strings
so it is the same as the MCExternalSymbolizer.
rdar://17349181
Modified:
llvm/trunk/lib/Target/AArch64/Disassembler/AArch64ExternalSymbolizer.cpp
llvm/trunk/test/tools/llvm-objdump/AArch64/macho-symbolized-disassembly.test
Modified: llvm/trunk/lib/Target/AArch64/Disassembler/AArch64ExternalSymbolizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/Disassembler/AArch64ExternalSymbolizer.cpp?rev=272588&r1=272587&r2=272588&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AArch64/Disassembler/AArch64ExternalSymbolizer.cpp (original)
+++ llvm/trunk/lib/Target/AArch64/Disassembler/AArch64ExternalSymbolizer.cpp Mon Jun 13 16:08:57 2016
@@ -134,9 +134,11 @@ bool AArch64ExternalSymbolizer::tryAddin
if (ReferenceType == LLVMDisassembler_ReferenceType_Out_LitPool_SymAddr)
CommentStream << "literal pool symbol address: " << ReferenceName;
else if (ReferenceType ==
- LLVMDisassembler_ReferenceType_Out_LitPool_CstrAddr)
- CommentStream << "literal pool for: \"" << ReferenceName << "\"";
- else if (ReferenceType ==
+ LLVMDisassembler_ReferenceType_Out_LitPool_CstrAddr) {
+ CommentStream << "literal pool for: \"";
+ CommentStream.write_escaped(ReferenceName);
+ CommentStream << "\"";
+ } else if (ReferenceType ==
LLVMDisassembler_ReferenceType_Out_Objc_CFString_Ref)
CommentStream << "Objc cfstring ref: @\"" << ReferenceName << "\"";
else if (ReferenceType ==
Modified: llvm/trunk/test/tools/llvm-objdump/AArch64/macho-symbolized-disassembly.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-objdump/AArch64/macho-symbolized-disassembly.test?rev=272588&r1=272587&r2=272588&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-objdump/AArch64/macho-symbolized-disassembly.test (original)
+++ llvm/trunk/test/tools/llvm-objdump/AArch64/macho-symbolized-disassembly.test Mon Jun 13 16:08:57 2016
@@ -7,8 +7,7 @@ OBJ: 000000000000001c adrp x0, L_.str at PA
OBJ: 0000000000000020 add x0, x0, L_.str at PAGEOFF
OBJ: 0000000000000024 bl _printf
-EXE: 0000000100007f58 add x0, x0, #0xfa8 ; literal pool for: "Hello world
-"
+EXE: 0000000100007f58 add x0, x0, #0xfa8 ; literal pool for: "Hello world\n"
EXE: 0000000100007f5c bl 0x100007f78 ; symbol stub for: _printf
ObjC-OBJ: 000000000000000c adrp x8, L_OBJC_SELECTOR_REFERENCES_3 at PAGE
More information about the llvm-commits
mailing list