diff options
| author | Reid Kleckner <rnk@google.com> | 2018-08-17 20:59:27 +0000 |
|---|---|---|
| committer | Reid Kleckner <rnk@google.com> | 2018-08-17 20:59:27 +0000 |
| commit | df8dd61f2309124689b07844e47abddf46203d4e (patch) | |
| tree | 32354278182035ccba0880108097a8da559b3473 /clang/test/CodeGenCXX/microsoft-abi-structors.cpp | |
| parent | f6e36ee83e1cd5c881b450561a021e834acc9810 (diff) | |
| download | bcm5719-llvm-df8dd61f2309124689b07844e47abddf46203d4e.tar.gz bcm5719-llvm-df8dd61f2309124689b07844e47abddf46203d4e.zip | |
[MS] Mangle a hash of the main file path into anonymous namespaces
Summary:
This is needed to avoid conflicts in mangled names for codeview types in
anonymous namespaces. In CodeView, types refer to each other typically
through forward declarations, which contain mangled names. These names
have to be unique, otherwise the debugger will look up the mangled name
and find the wrong definition.
Furthermore, ThinLTO will deduplicate the types, and debug info
verification can fail when the types have the wrong sizes. This is
PR38608.
Fixes PR38609.
Reviewers: majnemer, inglorion, hans
Subscribers: mehdi_amini, aprantl, JDevlieghere, dexonsmith, cfe-commits
Differential Revision: https://reviews.llvm.org/D50877
llvm-svn: 340079
Diffstat (limited to 'clang/test/CodeGenCXX/microsoft-abi-structors.cpp')
| -rw-r--r-- | clang/test/CodeGenCXX/microsoft-abi-structors.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/CodeGenCXX/microsoft-abi-structors.cpp b/clang/test/CodeGenCXX/microsoft-abi-structors.cpp index 97b90ce6b9e..b0d2b565403 100644 --- a/clang/test/CodeGenCXX/microsoft-abi-structors.cpp +++ b/clang/test/CodeGenCXX/microsoft-abi-structors.cpp @@ -467,9 +467,9 @@ struct A { void *getA() { return (void*)new A(); } -// CHECK: define internal x86_thiscallcc i8* @"??_GA@?A@@UAEPAXI@Z" +// CHECK: define internal x86_thiscallcc i8* @"??_GA@?A0x{{[^@]*}}@@UAEPAXI@Z" // CHECK: (%"struct.(anonymous namespace)::A"* %this, i32 %should_call_delete) -// CHECK: define internal x86_thiscallcc void @"??1A@?A@@UAE@XZ" +// CHECK: define internal x86_thiscallcc void @"??1A@?A0x{{[^@]*}}@@UAE@XZ" // CHECK: (%"struct.(anonymous namespace)::A"* %this) // Check that we correctly transform __stdcall to __thiscall for ctors and |

