[PATCH] D68915: [clang][IFS] Escape mangled name in-order to not break llvm-ifs with names mangled using MS ABI
Puyan Lotfi via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 14 11:02:49 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rG76f9869bf200: [clang][IFS] Escape mangled names so MS ABI doesn't break YAML parsing. (authored by plotfi).
Changed prior to commit:
https://reviews.llvm.org/D68915?vs=224756&id=224879#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68915/new/
https://reviews.llvm.org/D68915
Files:
clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp
clang/test/InterfaceStubs/inline.c
clang/test/InterfaceStubs/object.c
clang/test/InterfaceStubs/windows.cpp
Index: clang/test/InterfaceStubs/windows.cpp
===================================================================
--- /dev/null
+++ clang/test/InterfaceStubs/windows.cpp
@@ -0,0 +1,7 @@
+// REQUIRES: x86-registered-target
+// RUN: %clang -target x86_64-windows-msvc -o - %s \
+// RUN: -emit-interface-stubs -emit-merged-ifs | FileCheck %s
+
+// CHECK: Symbols:
+// CHECK-NEXT: ?helloWindowsMsvc@@YAHXZ
+int helloWindowsMsvc();
Index: clang/test/InterfaceStubs/object.c
===================================================================
--- clang/test/InterfaceStubs/object.c
+++ clang/test/InterfaceStubs/object.c
@@ -2,6 +2,6 @@
// RUN: %clang -fvisibility=default -c -o - -emit-interface-stubs %s | FileCheck -check-prefix=CHECK-SYMBOLS %s
// RUN: %clang -fvisibility=default -c -o - %s | llvm-nm - 2>&1 | FileCheck -check-prefix=CHECK-SYMBOLS %s
-// CHECK-TAPI: data: { Type: Object, Size: 4 }
+// CHECK-TAPI: "data" : { Type: Object, Size: 4 }
// CHECK-SYMBOLS: data
int data = 42;
Index: clang/test/InterfaceStubs/inline.c
===================================================================
--- clang/test/InterfaceStubs/inline.c
+++ clang/test/InterfaceStubs/inline.c
@@ -56,8 +56,8 @@
// RUN: -c -std=gnu89 -xc %s | llvm-nm - 2>&1 | \
// RUN: FileCheck -check-prefix=CHECK-SYMBOLS %s
-// CHECK-TAPI-DAG: foo: { Type: Func }
-// CHECK-TAPI-DAG: foo.var: { Type: Object, Size: 4 }
+// CHECK-TAPI-DAG: "foo" : { Type: Func }
+// CHECK-TAPI-DAG: "foo.var" : { Type: Object, Size: 4 }
// CHECK-SYMBOLS-DAG: foo
// CHECK-SYMBOLS-DAG: foo.var
#include "inline.h"
Index: clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp
===================================================================
--- clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp
+++ clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp
@@ -263,11 +263,11 @@
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(
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68915.224879.patch
Type: text/x-patch
Size: 2343 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20191014/5e574153/attachment.bin>
More information about the cfe-commits
mailing list