Skip to content

Commit 5c217c2

Browse files
committed
change to global variable metadata to improve COMMON block debug user experience
1 parent 5d97d45 commit 5c217c2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/AsmParser/LLParser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4726,7 +4726,7 @@ bool LLParser::ParseDITemplateValueParameter(MDNode *&Result, bool IsDistinct) {
47264726
/// isDefinition: true, declaration: !3, align: 8)
47274727
bool LLParser::ParseDIGlobalVariable(MDNode *&Result, bool IsDistinct) {
47284728
#define VISIT_MD_FIELDS(OPTIONAL, REQUIRED) \
4729-
REQUIRED(name, MDStringField, (/* AllowEmpty */ false)); \
4729+
REQUIRED(name, MDStringField, (/* AllowEmpty */ true)); \
47304730
OPTIONAL(scope, MDField, ); \
47314731
OPTIONAL(linkageName, MDStringField, ); \
47324732
OPTIONAL(file, MDField, ); \

lib/IR/Verifier.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1244,7 +1244,7 @@ void Verifier::visitDIGlobalVariable(const DIGlobalVariable &N) {
12441244
visitDIVariable(N);
12451245

12461246
AssertDI(N.getTag() == dwarf::DW_TAG_variable, "invalid tag", &N);
1247-
AssertDI(!N.getName().empty(), "missing global variable name", &N);
1247+
//AssertDI(!N.getName().empty(), "missing global variable name", &N);
12481248
AssertDI(isType(N.getRawType()), "invalid type ref", &N, N.getRawType());
12491249
AssertDI(N.getType(), "missing global variable type", &N);
12501250
if (auto *Member = N.getRawStaticDataMemberDeclaration()) {

0 commit comments

Comments
 (0)