[PATCH] D63012: Use fully qualified name when printing S_CONSTANT records
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 7 13:43:26 PDT 2019
rnk added inline comments.
================
Comment at: llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp:3080-3081
+ // Enums defined in classes should also get scope from the class.
+ if (const auto *EnumTy = DIGV->getType())
+ if (const auto *EnumScope = EnumTy->getScope())
+ Scope = EnumScope;
----------------
This seems like it would do the wrong thing for a regular constant that isn't an enum, but which has an enum type. This kind of thing:
namespace Bar {
enum Foo { FooA, FooB };
}
const Bar::Foo foo_gv = Bar::FooA;
... might come out as Bar::foo_gv when it should be just foo_gv.
I'm not actually sure what to do in this case, because we made enumerators look a lot like const ints, that was the whole idea. I mean, we could change clang to make them look like static const data members, I guess, but that seems like a step too far.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63012/new/
https://reviews.llvm.org/D63012
More information about the llvm-commits
mailing list