3 Commits

Author SHA1 Message Date
Fangrui Song
c5de4dd1ea [test] %clang_cc1 -emit-llvm: remove redundant -S
And replace -emit-llvm -o - with -emit-llvm-only
2024-05-04 17:00:29 -07:00
Chuanqi Xu
ef0291e5f4 [NFC] [Serialization] Reordering lexcical and visible TU block after type decl offsets
This patch reorder the lexical block for the translation unit, visible update block for the TU and
the viisble upaete block for the extern C context after the type decl
offsets block.

This should be a NFC patch.

This is helpful for later optimizations for eliding unreachable
declarations in the global module fragment. See the comments in
https://github.com/llvm/llvm-project/pull/76930.

Simply, if we want to get the reachable sets of declaratins during the
writing process, we need to write the file-level context later than the
process of writing declarations (which is the main process to determine
the reachable set).
2024-04-01 16:16:03 +08:00
Chuanqi Xu
f8d5f0e53b [NFC] Add two tests for C++ modules
One test for checking the decls in language linkage shouldn't be
discarded and can be mangled correctly.

Another one for checking we can't export again in an export decl.
2023-02-16 17:02:04 +08:00