<div dir="ltr">Sounds plausible.<br><br>(just to check: what's the motivation not to use the LLVM versions of these enums if they match the desired semantics? (I imagine there are many good reasons not to use them, just figure it's worth writing down in this thread so it's clear for historic purposes))</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 5, 2016 at 10:57 AM, Robinson, Paul via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">In r259489, Benny Kramer moved the DebugInfoKind enum into its own<br>
header, include/clang/Driver/DebugInfoKind.h. This was to prevent<br>
Driver from pulling in headers from Frontend.  However, this leaves<br>
the enum in kind of a weird place, I think Basic would be better (and<br>
not re-introduce the problem Benny was solving).<br>
<br>
Wondering why the tuning enum didn't cause the same problem, I found<br>
that when I created the Clang enum, I didn't make Driver use it; it's<br>
still using the LLVM version of the enum.  While this is not<br>
technically wrong (you could rearrange the values and it would do no<br>
harm) it's an inconsistency within Clang.<br>
<br>
But, if I make Driver use the tuning enum from Clang's CodeGenOptions,<br>
then we'll have the same problem that prompted r259489 in the first<br>
place--Driver depending on Frontend. Rather than create Yet Another<br>
Header, it would be convenient to put the tuning enum in the same<br>
place as DebugInfoKind, as they are topically related and commonly<br>
used in the same places.<br>
<br>
I propose to do the following:<br>
<br>
Patch #1 (totally mechanical)<br>
- move DebugInfoKind.h from Driver to Basic<br>
- rename it to DebugInfoOptions.h<br>
This will take care of all the #include renaming in one go.<br>
<br>
Patch #2 (basically mechanical)<br>
- move the DebuggerKind enum from CodeGenOptions.h to DebugInfoOptions.h<br>
- fix up Driver to use this enum instead of the LLVM equivalent.<br>
<br>
Or I can do it all at once, the combined patch would still be<br>
reasonable I think.<br>
<br>
Sound okay?<br>
--paulr<br>
<br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
</blockquote></div><br></div>