[llvm-commits] Patch to add flag in llvm-extract for including aliases in the extraction.
Villmow, Micah
Micah.Villmow at amd.com
Tue Sep 25 08:34:29 PDT 2012
So, the patch itself looks fine in its current form, however is there not a way to delete the alias's without requiring to store them first?
Maybe something like this would work?
+static void extractAliases(Module* M,
+ SetVector<GlobalValue *> &GVs) {+
+ // Find aliases to be erased
+ for (Module::alias_iterator I = M->alias_begin(), E = M->alias_end();
+ I != E; ) {
+ GlobalAlias *GA = I++;
+ GlobalValue *GV =
+ const_cast<GlobalValue*>((GA).resolveAliasedGlobal(false));
+ if ((GVs.count(GV) != 0) == DeleteFn)
+ GA->eraseFromParent();
+ }
+}
> -----Original Message-----
> From: llvm-commits-bounces at cs.uiuc.edu [mailto:llvm-commits-
> bounces at cs.uiuc.edu] On Behalf Of Jan Sjodin
> Sent: Tuesday, September 25, 2012 6:23 AM
> To: Duncan Sands; llvm-commits at cs.uiuc.edu
> Subject: Re: [llvm-commits] Patch to add flag in llvm-extract for
> including aliases in the extraction.
>
> Ok. Re-ping-ping with patch!
>
> - Jan
>
> >________________________________
> > From: Duncan Sands <baldrick at free.fr>
> >To: llvm-commits at cs.uiuc.edu
> >Sent: Saturday, September 22, 2012 6:06 AM
> >Subject: Re: [llvm-commits] Patch to add flag in llvm-extract for
> including aliases in the extraction.
> >
> >On 21/09/12 17:36, Jan Sjodin wrote:
> >>
> >> Ping! Ping!
> >
> >Please supply the patch when you ping.
> >
> >Ciao, Duncan.
> >_______________________________________________
> >llvm-commits mailing list
> >llvm-commits at cs.uiuc.edu
> >http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> >
> >
> >
More information about the llvm-commits
mailing list