r225802 - Handle [extern_c] attribute in module printer

Sean Silva chisophugis at gmail.com
Tue Jan 13 13:21:28 PST 2015


Is this testable?

On Tue, Jan 13, 2015 at 9:47 AM, Ben Langmuir <blangmuir at apple.com> wrote:

> Author: benlangmuir
> Date: Tue Jan 13 11:47:38 2015
> New Revision: 225802
>
> URL: http://llvm.org/viewvc/llvm-project?rev=225802&view=rev
> Log:
> Handle [extern_c] attribute in module printer
>
> I'm not sure why we have OS.indent(Indent+2) for the system attribute,
> but presumably we want the same behaviour for all attributes...
>
> Modified:
>     cfe/trunk/lib/Basic/Module.cpp
>
> Modified: cfe/trunk/lib/Basic/Module.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Module.cpp?rev=225802&r1=225801&r2=225802&view=diff
>
> ==============================================================================
> --- cfe/trunk/lib/Basic/Module.cpp (original)
> +++ cfe/trunk/lib/Basic/Module.cpp Tue Jan 13 11:47:38 2015
> @@ -293,9 +293,12 @@ void Module::print(raw_ostream &OS, unsi
>      OS << "explicit ";
>    OS << "module " << Name;
>
> -  if (IsSystem) {
> +  if (IsSystem || IsExternC) {
>      OS.indent(Indent + 2);
> -    OS << " [system]";
> +    if (IsSystem)
> +      OS << " [system]";
> +    if (IsExternC)
> +      OS << " [extern_c]";
>    }
>
>    OS << " {\n";
>
>
> _______________________________________________
> 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/20150113/1e6c8fe9/attachment.html>


More information about the cfe-commits mailing list