File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -126,13 +126,10 @@ llvm::InlineAsm *IRGenModule::getObjCRetainAutoreleasedReturnValueMarker() {
126
126
// and let the late ARC pass insert it, but don't generate any calls
127
127
// right now.
128
128
if (IRGen.Opts .shouldOptimize ()) {
129
- llvm::NamedMDNode *metadata =
130
- Module.getOrInsertNamedMetadata (
131
- " clang.arc.retainAutoreleasedReturnValueMarker" );
132
- assert (metadata->getNumOperands () <= 1 );
133
- if (metadata->getNumOperands () == 0 ) {
134
- auto *string = llvm::MDString::get (LLVMContext, asmString);
135
- metadata->addOperand (llvm::MDNode::get (LLVMContext, string));
129
+ const char *markerKey = " clang.arc.retainAutoreleasedReturnValueMarker" ;
130
+ if (!Module.getModuleFlag (markerKey)) {
131
+ auto *str = llvm::MDString::get (LLVMContext, asmString);
132
+ Module.addModuleFlag (llvm::Module::Error, markerKey, str);
136
133
}
137
134
138
135
cache = nullptr ;
You can’t perform that action at this time.
0 commit comments