> URL: http://llvm.org/viewvc/llvm-project?rev=42278&view=rev
> Log:
> Add support on x86 for having Legalize lower ISD::LOCATION to  
> ISD::DEBUG_LOC
> instead of ISD::LABEL with a manual .debug_line entry when the  
> assembler
> supports .file and .loc directives.

Nice!

>
> -  // We don't have line number support yet.
> +  // Use the default ISD::LOCATION expansion, and tell Legalize it's
> +  // ok to use DEBUG_LOC if we have an assembler that supports it.
>    setOperationAction(ISD::LOCATION, MVT::Other, Expand);
> -  setOperationAction(ISD::DEBUG_LOC, MVT::Other, Expand);
> +  if (TM.getTargetAsmInfo()->hasDotLocAndDotFile())
> +    setOperationAction(ISD::DEBUG_LOC, MVT::Other, Legal);
> +  else
> +    setOperationAction(ISD::DEBUG_LOC, MVT::Other, Expand);

Would it make sense to move this to a superclass?  It doesn't seem  
like any other definition would make sense.

-chris
_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to