<div dir="ltr">Responding to this manually since the mailing list doesn't seem to be pushing this email out  (it shows up in the archive, but it hasn't been pushed to email subscribers).</div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Tue, Jun 24, 2014 at 3:47 PM, Zachary Turner <span dir="ltr"><<a href="mailto:zturner@google.com" target="_blank">zturner@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi tfiala,<br>
<br>
Don't truncate the target triple when initializing clang.<br>
<br>
Target triples support an optional 4th component, the environment.  Clang on Windows uses this 4th component to make various decisions when looking for header file includes, so truncating it leads to crashes on Windows when performing simple expression evaluation.<br>

<br>
<a href="http://reviews.llvm.org/D4282" target="_blank">http://reviews.llvm.org/D4282</a><br>
<br>
Files:<br>
  source/Expression/ClangExpressionParser.cpp<br>
<br>
Index: source/Expression/ClangExpressionParser.cpp<br>
===================================================================<br>
--- source/Expression/ClangExpressionParser.cpp<br>
+++ source/Expression/ClangExpressionParser.cpp<br>
@@ -129,19 +129,6 @@<br>
     if (target_sp && target_sp->GetArchitecture().IsValid())<br>
     {<br>
         std::string triple = target_sp->GetArchitecture().GetTriple().str();<br>
-<br>
-        int dash_count = 0;<br>
-        for (size_t i = 0; i < triple.size(); ++i)<br>
-        {<br>
-            if (triple[i] == '-')<br>
-                dash_count++;<br>
-            if (dash_count == 3)<br>
-            {<br>
-                triple.resize(i);<br>
-                break;<br>
-            }<br>
-        }<br>
-<br>
         m_compiler->getTargetOpts().Triple = triple;<br>
     }<br>
     else<br>
</blockquote></div><br></div>