Skip to content

Commit b302f25

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

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
@@ -1192,7 +1192,8 @@ void LowerTypeTestsModule::verifyTypeMDNode(GlobalObject *GO, MDNode *Type) {
11921192

11931193
if (GO->isThreadLocal())
11941194
report_fatal_error("Bit set element may not be thread-local");
1195-
if (isa<GlobalVariable>(GO) && GO->hasSection())
1195+
if (isa<GlobalVariable>(GO) && GO->hasSection() &&
1196+
!GO->hasMetadata("typed_global_not_for_cfi"))
11961197
report_fatal_error(
11971198
"A member of a type identifier may not have an explicit section");
11981199

0 commit comments

Comments
 (0)