[llvm-commits] [llvm] r79078 - /llvm/trunk/lib/Target/TargetLoweringObjectFile.cpp

Richard Osborne richard at xmos.com
Mon Aug 17 09:47:22 PDT 2009


Chris Lattner wrote:
> Author: lattner
> Date: Sat Aug 15 01:08:34 2009
> New Revision: 79078
>
> URL: http://llvm.org/viewvc/llvm-project?rev=79078&view=rev
> Log:
> If ELF subtargets don't want to support 4/8/16-byte mergable sections, allow 
> them to null out the default section pointers.
>
> Modified:
>     llvm/trunk/lib/Target/TargetLoweringObjectFile.cpp
>
> Modified: llvm/trunk/lib/Target/TargetLoweringObjectFile.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetLoweringObjectFile.cpp?rev=79078&r1=79077&r2=79078&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Target/TargetLoweringObjectFile.cpp (original)
> +++ llvm/trunk/lib/Target/TargetLoweringObjectFile.cpp Sat Aug 15 01:08:34 2009
> @@ -578,11 +578,11 @@
>    }
>    
>    if (Kind.isMergeableConst()) {
> -    if (Kind.isMergeableConst4())
> +    if (Kind.isMergeableConst4() && MergeableConst4Section)
>        return MergeableConst4Section;
> -    if (Kind.isMergeableConst8())
> +    if (Kind.isMergeableConst8() && MergeableConst8Section)
>        return MergeableConst8Section;
> -    if (Kind.isMergeableConst16())
> +    if (Kind.isMergeableConst16() && MergeableConst16Section)
>        return MergeableConst16Section;
>      return ReadOnlySection;  // .const
>    }
>   
Hi Chris,

In order to handle null mergable sections getSectionForConstant() also 
needs to be updated. I've fixed this in in r79249:

http://llvm.org/viewvc/llvm-project?rev=79249&view=rev

Regards,

Richard




More information about the llvm-commits mailing list