[cfe-commits] r55869 - /cfe/trunk/lib/Basic/Targets.cpp
Daniel Dunbar
daniel at zuster.org
Fri Sep 5 19:13:30 PDT 2008
darwin x86-32 is '_', but it might be worth just consulting the gcc source.
Would it make more sense to have this embedded in TargetInfo? It looks
like it is something that is always set by GCC but the definition varies
based on the target. We may also need this information anyway in other
places, for example if we were to support -fno-underscores, but I haven't
investigated this.
- Daniel
On Fri, Sep 5, 2008 at 6:37 PM, Eli Friedman <eli.friedman at gmail.com> wrote:
> Author: efriedma
> Date: Fri Sep 5 20:37:51 2008
> New Revision: 55869
>
> URL: http://llvm.org/viewvc/llvm-project?rev=55869&view=rev
> Log:
> Per PR2773, define __USER_LABEL_PREFIX__ for x86-32 Linux and Windows.
>
> If you're on some other platform, the correct definition for this macro
> would be appreciated; to find the correct definition, just run the
> following command:
>
> echo | gcc -dM -E - | grep USER_LABEL_PREFIX
>
>
> Modified:
> cfe/trunk/lib/Basic/Targets.cpp
>
> Modified: cfe/trunk/lib/Basic/Targets.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=55869&r1=55868&r2=55869&view=diff
>
>
> ==============================================================================
> --- cfe/trunk/lib/Basic/Targets.cpp (original)
> +++ cfe/trunk/lib/Basic/Targets.cpp Fri Sep 5 20:37:51 2008
> @@ -698,6 +698,7 @@
> virtual void getTargetDefines(std::vector<char> &Defines) const {
> X86_32TargetInfo::getTargetDefines(Defines);
> getLinuxDefines(Defines);
> + Define(Defines, "__USER_LABEL_PREFIX__", "");
> }
> };
> } // end anonymous namespace
> @@ -724,6 +725,7 @@
> Define(Defines, "WINNT");
> Define(Defines, "_X86_");
> Define(Defines, "__MSVCRT__");
> + Define(Defines, "__USER_LABEL_PREFIX__", "_");
> }
> };
> } // end anonymous namespace
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20080905/03dba2ba/attachment.html>
More information about the cfe-commits
mailing list