aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp
diff options
context:
space:
mode:
authorPuyan Lotfi <puyan@puyan.org>2019-10-14 18:03:03 +0000
committerPuyan Lotfi <puyan@puyan.org>2019-10-14 18:03:03 +0000
commit76f9869bf20034d5d722d29999e845a1f9c0505d (patch)
tree72265ed9e367a9109864b5d4c4a61c1b837f5aef /clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp
parentc86ba58188332c5482150bf337696888cf91355c (diff)
downloadllvm-76f9869bf20034d5d722d29999e845a1f9c0505d.zip
llvm-76f9869bf20034d5d722d29999e845a1f9c0505d.tar.gz
llvm-76f9869bf20034d5d722d29999e845a1f9c0505d.tar.bz2
[clang][IFS] Escape mangled names so MS ABI doesn't break YAML parsing.
Microsoft's ABI mangles names differently than Itanium and this breaks the LLVM yaml parser unless the name is escaped in quotes. Quotes are being added to the mangled names of the IFS file generation so that llvm-ifs doesn't break when Windows triples are passed to the driver. Differential Revision: https://reviews.llvm.org/D68915 llvm-svn: 374798
Diffstat (limited to 'clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp')
-rw-r--r--clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp b/clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp
index 5ce7a36..0b28b78 100644
--- a/clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp
+++ b/clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp
@@ -263,11 +263,11 @@ public:
for (const auto &E : Symbols) {
const MangledSymbol &Symbol = E.second;
for (auto Name : Symbol.Names) {
- OS << " "
+ OS << " \""
<< (Symbol.ParentName.empty() || Instance.getLangOpts().CPlusPlus
? ""
: (Symbol.ParentName + "."))
- << Name << ": { Type: ";
+ << Name << "\" : { Type: ";
switch (Symbol.Type) {
default:
llvm_unreachable(