[llvm-commits] [llvm] r42278 - /llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
Chris Lattner
clattner at apple.com
Mon Sep 24 22:32:37 PDT 2007
> 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
More information about the llvm-commits
mailing list