[llvm] d408621 - [dsymutil] Escape CFBundleIdentifier in plist.
Jonas Devlieghere via llvm-commits
llvm-commits at lists.llvm.org
Tue May 26 09:38:42 PDT 2020
Author: Jonas Devlieghere
Date: 2020-05-26T09:38:32-07:00
New Revision: d4086213c6d76fcaa5fa620ad680eaaf886cc66e
URL: https://github.com/llvm/llvm-project/commit/d4086213c6d76fcaa5fa620ad680eaaf886cc66e
DIFF: https://github.com/llvm/llvm-project/commit/d4086213c6d76fcaa5fa620ad680eaaf886cc66e.diff
LOG: [dsymutil] Escape CFBundleIdentifier in plist.
Revision 333565 started escaping HTML special characters in the plist
written by dsymutil, but didn't include the updated CFBundleIdentifier.
Added:
Modified:
llvm/test/tools/dsymutil/Inputs/Info.plist
llvm/test/tools/dsymutil/X86/darwin-bundle.test
llvm/tools/dsymutil/dsymutil.cpp
Removed:
################################################################################
diff --git a/llvm/test/tools/dsymutil/Inputs/Info.plist b/llvm/test/tools/dsymutil/Inputs/Info.plist
index 97c0ae261f35..e330c951d68a 100644
--- a/llvm/test/tools/dsymutil/Inputs/Info.plist
+++ b/llvm/test/tools/dsymutil/Inputs/Info.plist
@@ -5,7 +5,7 @@
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleIdentifier</key>
- <string>custom</string>
+ <string>Foo&Bar</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
diff --git a/llvm/test/tools/dsymutil/X86/darwin-bundle.test b/llvm/test/tools/dsymutil/X86/darwin-bundle.test
index 7f1224f30a1e..d44b25e48705 100644
--- a/llvm/test/tools/dsymutil/X86/darwin-bundle.test
+++ b/llvm/test/tools/dsymutil/X86/darwin-bundle.test
@@ -18,7 +18,7 @@ CHECK-NEXT: <dict>
CHECK-NEXT: <key>CFBundleDevelopmentRegion</key>
CHECK-NEXT: <string>English</string>
CHECK-NEXT: <key>CFBundleIdentifier</key>
-CHECK-NEXT: <string>com.apple.xcode.dsym.custom</string>
+CHECK-NEXT: <string>com.apple.xcode.dsym.Foo&Bar</string>
CHECK-NEXT: <key>CFBundleInfoDictionaryVersion</key>
CHECK-NEXT: <string>6.0</string>
CHECK-NEXT: <key>CFBundlePackageType</key>
diff --git a/llvm/tools/dsymutil/dsymutil.cpp b/llvm/tools/dsymutil/dsymutil.cpp
index 32df55611f07..3a32acbec06f 100644
--- a/llvm/tools/dsymutil/dsymutil.cpp
+++ b/llvm/tools/dsymutil/dsymutil.cpp
@@ -338,7 +338,9 @@ static Error createPlistFile(StringRef Bin, StringRef BundleRoot,
<< "\t\t<key>CFBundleDevelopmentRegion</key>\n"
<< "\t\t<string>English</string>\n"
<< "\t\t<key>CFBundleIdentifier</key>\n"
- << "\t\t<string>com.apple.xcode.dsym." << BI.IDStr << "</string>\n"
+ << "\t\t<string>com.apple.xcode.dsym.";
+ printHTMLEscaped(BI.IDStr, PL);
+ PL << "</string>\n"
<< "\t\t<key>CFBundleInfoDictionaryVersion</key>\n"
<< "\t\t<string>6.0</string>\n"
<< "\t\t<key>CFBundlePackageType</key>\n"
More information about the llvm-commits
mailing list