[PATCH] D80242: [Clang] implement -fno-eliminate-unused-debug-types
Nick Desaulniers via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 2 14:16:22 PDT 2020
nickdesaulniers planned changes to this revision.
nickdesaulniers added inline comments.
================
Comment at: clang/lib/CodeGen/CodeGenModule.cpp:5317
/// EmitTopLevelDecl - Emit code for a single top level declaration.
void CodeGenModule::EmitTopLevelDecl(Decl *D) {
// Ignore dependent declarations.
----------------
dblaikie wrote:
> Since this is only for top-level decls, have you checked this works for types inside namespaces, local types in functions (well, that one might not be supported by GCC - so probably good to test/compare GCC's behavior here too), etc?
class declared in namespace works with this patch. I'll add a test.
local type in function, ex.
```
void foo(void) {
struct bar {};
}
```
is not in the current diff, but is supported by gcc. Let me fix that and add a test. Great suggestion.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80242/new/
https://reviews.llvm.org/D80242
More information about the cfe-commits
mailing list