[PATCH] D50877: [MS] Mangle a hash of the main file path into anonymous namespaces

2018-08-17 Thread Reid Kleckner via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC340079: [MS] Mangle a hash of the main file path into anonymous namespaces (authored by rnk, committed by ). Changed prior to commit: https://reviews.llvm.org/D50877?vs=161310&id=161323#toc Repository:

[PATCH] D50877: [MS] Mangle a hash of the main file path into anonymous namespaces

2018-08-17 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. In https://reviews.llvm.org/D50877#1204609, @thakis wrote: > Can you explicitly mention that this intentionally doesn't use an absolute > path in MicrosoftMangleContextImpl() or similar? Sure. I also described the issue with codeview that motivates why we want unique name

[PATCH] D50877: [MS] Mangle a hash of the main file path into anonymous namespaces

2018-08-17 Thread Reid Kleckner via Phabricator via cfe-commits
rnk updated this revision to Diff 161310. rnk marked an inline comment as done. rnk added a comment. - improve comment https://reviews.llvm.org/D50877 Files: clang/lib/AST/MicrosoftMangle.cpp clang/test/CodeGenCXX/cfi-cross-dso.cpp clang/test/CodeGenCXX/cfi-icall.cpp clang/test/CodeGenC

[PATCH] D50877: [MS] Mangle a hash of the main file path into anonymous namespaces

2018-08-17 Thread Nico Weber via Phabricator via cfe-commits
thakis accepted this revision. thakis added a comment. This revision is now accepted and ready to land. Can you explicitly mention that this intentionally doesn't use an absolute path in MicrosoftMangleContextImpl() or similar? https://reviews.llvm.org/D50877

[PATCH] D50877: [MS] Mangle a hash of the main file path into anonymous namespaces

2018-08-17 Thread Reid Kleckner via Phabricator via cfe-commits
rnk marked an inline comment as done. rnk added a comment. Exactly, this makes our names match MSVC more closely. Their hash depends on the path to the main source file. It doesn't care if the file is in a header. However, they use the absolute path to the file instead of the (probably relative

[PATCH] D50877: [MS] Mangle a hash of the main file path into anonymous namespaces

2018-08-17 Thread Reid Kleckner via Phabricator via cfe-commits
rnk updated this revision to Diff 161293. rnk added a comment. - Use xxHash64 https://reviews.llvm.org/D50877 Files: clang/lib/AST/MicrosoftMangle.cpp clang/test/CodeGenCXX/cfi-cross-dso.cpp clang/test/CodeGenCXX/cfi-icall.cpp clang/test/CodeGenCXX/debug-info-thunk.cpp clang/test/Code

[PATCH] D50877: [MS] Mangle a hash of the main file path into anonymous namespaces

2018-08-16 Thread Bob Haarman via Phabricator via cfe-commits
inglorion added inline comments. Comment at: clang/lib/AST/MicrosoftMangle.cpp:389 + if (FE) { +llvm::MD5 Hasher; +llvm::MD5::MD5Result Hash; Instead of MD5, can we use xxhash (or whatever the fastest hash algorithm in LLVM is these days)? I don't think

[PATCH] D50877: [MS] Mangle a hash of the main file path into anonymous namespaces

2018-08-16 Thread Zachary Turner via Phabricator via cfe-commits
zturner added subscribers: rnk, zturner. zturner added a comment. IIRC it’s `?A0xABCDABCD@` where the hex value is some kind of hash https://reviews.llvm.org/D50877 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bi

Re: [PATCH] D50877: [MS] Mangle a hash of the main file path into anonymous namespaces

2018-08-16 Thread Zachary Turner via cfe-commits
IIRC it’s `?A0xABCDABCD@` where the hex value is some kind of hash On Thu, Aug 16, 2018 at 5:27 PM David Majnemer via Phabricator < revi...@reviews.llvm.org> wrote: > majnemer added a comment. > > How does MSVC handle this case? What mangled name does it generate? > > > https://reviews.llvm.org/D5

[PATCH] D50877: [MS] Mangle a hash of the main file path into anonymous namespaces

2018-08-16 Thread David Majnemer via Phabricator via cfe-commits
majnemer added a comment. How does MSVC handle this case? What mangled name does it generate? https://reviews.llvm.org/D50877 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D50877: [MS] Mangle a hash of the main file path into anonymous namespaces

2018-08-16 Thread Reid Kleckner via Phabricator via cfe-commits
rnk created this revision. rnk added reviewers: majnemer, inglorion, hans. Herald added subscribers: dexonsmith, JDevlieghere, aprantl, mehdi_amini. This is needed to avoid conflicts in mangled names for codeview types in anonymous namespaces. In CodeView, types refer to each other typically throu