This is an archive of the discontinued LLVM Phabricator instance.

[clang][IFS] Escape mangled name in-order to not break llvm-ifs with names mangled using MS ABI
ClosedPublic

Authored by plotfi on Oct 12 2019, 11:00 AM.

Diff Detail

Repository
rC Clang

Event Timeline

plotfi created this revision.Oct 12 2019, 11:00 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 12 2019, 11:00 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
plotfi updated this revision to Diff 224756.Oct 12 2019, 11:02 AM
compnerd accepted this revision.Oct 14 2019, 10:07 AM
This revision is now accepted and ready to land.Oct 14 2019, 10:07 AM
This revision was automatically updated to reflect the committed changes.
thakis added a subscriber: thakis.Oct 14 2019, 11:12 AM

On macOS symbols are prefixed with an underscore:

Command Output (stderr):
--
/Users/thakis/src/llvm-project/clang/test/InterfaceStubs/object.c:5:16: error: CHECK-TAPI: expected string not found in input
// CHECK-TAPI: "data" : { Type: Object, Size: 4 }
               ^
<stdin>:1:1: note: scanning from here
--- !experimental-ifs-v1
^
<stdin>:6:3: note: possible intended match here
 "_data" : { Type: Object, Size: 4 }
  ^

--
********************
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. 
Testing Time: 164.94s
********************
Failing Tests (1):
    Clang :: InterfaceStubs/object.c``

I see what went wrong. Will post a fix shortly.

On macOS symbols are prefixed with an underscore:

Command Output (stderr):
--
/Users/thakis/src/llvm-project/clang/test/InterfaceStubs/object.c:5:16: error: CHECK-TAPI: expected string not found in input
// CHECK-TAPI: "data" : { Type: Object, Size: 4 }
               ^
<stdin>:1:1: note: scanning from here
--- !experimental-ifs-v1
^
<stdin>:6:3: note: possible intended match here
 "_data" : { Type: Object, Size: 4 }
  ^

--
********************
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. 
Testing Time: 164.94s
********************
Failing Tests (1):
    Clang :: InterfaceStubs/object.c``