File tree Expand file tree Collapse file tree 1 file changed +1
-12
lines changed
Expand file tree Collapse file tree 1 file changed +1
-12
lines changed Original file line number Diff line number Diff line change @@ -78,19 +78,8 @@ bool StaticDataAnnotator::runOnModule(Module &M) {
7878 if (!llvm::memprof::IsAnnotationOK (GV))
7979 continue ;
8080
81- // The implementation below assumes prior passes don't set section prefixes,
82- // and specifically do 'assign' rather than 'update'. So report error if a
83- // section prefix is already set.
84- if (auto maybeSectionPrefix = GV.getSectionPrefix ();
85- maybeSectionPrefix && !maybeSectionPrefix->empty ())
86- llvm::report_fatal_error (" Global variable " + GV.getName () +
87- " already has a section prefix " +
88- *maybeSectionPrefix);
89-
9081 StringRef SectionPrefix = SDPI->getConstantSectionPrefix (&GV, PSI);
91- if (SectionPrefix.empty ())
92- continue ;
93-
82+ // setSectionPrefix returns true if the section prefix is updated.
9483 Changed |= GV.setSectionPrefix (SectionPrefix);
9584 }
9685
You can’t perform that action at this time.
0 commit comments