Skip to content

Commit 373511f

Browse files
committed
[LowerTypeTests] Allow custom sections when !typed_global_not_for_cfi is set on the global
1 parent fc1031d commit 373511f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/Transforms/IPO/LowerTypeTests.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1203,7 +1203,8 @@ void LowerTypeTestsModule::verifyTypeMDNode(GlobalObject *GO, MDNode *Type) {
12031203

12041204
if (GO->isThreadLocal())
12051205
report_fatal_error("Bit set element may not be thread-local");
1206-
if (isa<GlobalVariable>(GO) && GO->hasSection())
1206+
if (isa<GlobalVariable>(GO) && GO->hasSection() &&
1207+
!GO->hasMetadata("typed_global_not_for_cfi"))
12071208
report_fatal_error(
12081209
"A member of a type identifier may not have an explicit section");
12091210

0 commit comments

Comments
 (0)