Displaying 2 results from an estimated 2 matches for "gettargetctor".
2006 Aug 20
0
[LLVMdev] Weird behavior of llvm-ld
...> + std::auto_ptr<TargetMachine> target;
> + for (unsigned i = 0; i < OptimizationList.size(); ++i) {
> + const PassInfo *Opt = OptimizationList[i];
> +
> + if (Opt->getNormalCtor())
> + Passes.add(Opt->getNormalCtor()());
> + else if (Opt->getTargetCtor()) {
> +#if 0
> + if (target.get() == NULL)
> + target.reset(allocateSparcTargetMachine()); // FIXME: target option
> +#endif
> + assert(target.get() && "Could not allocate target machine!");
> + Passes.add(Opt->getTargetCtor()(*target.get()));...
2006 Aug 18
2
[LLVMdev] Weird behavior of llvm-ld
Hi,
Reid Spencer wrote:
>> That's interesting! So, one only needs to add a 2-arg function called
>> RunOptimizations to the module (can't check it right now)?
>>
>
> That is correct. That function and only that function will be called.
> What happens in that function is up to you :)
>
So, I tried this the last two days, but to no avail. I first