+
+ // <rdar://problem/34121435> Add linker support for propagating N_AST debug notes from .o files to linked image
+ if ( const std::vector<relocatable::File::AstTimeAndPath>* asts = atomObjFile->astFiles() ) {
+ for (const relocatable::File::AstTimeAndPath& file : *asts) {
+ const char* cpath = file.path.c_str();
+ if ( seenAstPaths.count(cpath) != 0 )
+ continue;
+ seenAstPaths.insert(cpath);
+ // generate N_AST in output
+ ld::relocatable::File::Stab astStab;
+ astStab.atom = NULL;
+ astStab.type = N_AST;
+ astStab.other = 0;
+ astStab.desc = 0;
+ astStab.value = file.time;
+ astStab.string = cpath;
+ state.stabs.push_back(astStab);
+ }
+ }