<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Hi all :)</p>
    <p>I'm new to llvm!<br>
    </p>
    <p>I'm going through the kaleidoscope : compiling llvm IR to object
      code tutorial, code in the listings breaks and causes a
      segmentation fault. After some investigation through gdb, probably
      this constructor call, causing the segfault.<br>
    </p>
    <p><code>Program received signal SIGSEGV, Segmentation fault.</code><code><br>
      </code><code>0x00000000004afee0 in
        llvm::optional_detail::OptionalStorage<llvm::Reloc::Model,
true>::OptionalStorage(llvm::optional_detail::OptionalStorage<llvm::Reloc::Model,
        true> const&) ()</code></p>
    <p><code>Source code: </code><br>
    </p>
    <div style="color: #f8f8f2;background-color: #272822;font-family: 'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback';font-weight: normal;font-size: 14px;line-height: 19px;white-space: pre;"><div><span style="color: #f8f8f2;">TargetOptions opt;</span></div><div><font face="Courier New, Courier, monospace"><span style="color: #f8f8f2;">  </span><span style="color: #66d9ef;font-style: italic;">auto</span><span style="color: #f8f8f2;"> RM </span><span style="color: #f92672;">=</span><span style="color: #f8f8f2;"> Optional</span><span style="color: #f92672;"><</span><span style="color: #f8f8f2;">Reloc::Model</span><span style="color: #f92672;">></span><span style="color: #f8f8f2;">();</span></font></div><div><span style="color: #f8f8f2;">  </span><span style="color: #66d9ef;font-style: italic;">auto</span><span style="color: #f8f8f2;"> TheTargetMachine </span><span style="color: #f92672;">=</span></div><div><span style="color: #f8f8f2;">      Target-></span><span style="color: #a6e22e;">createTargetMachine</span><span style="color: #f8f8f2;">(TargetTriple, CPU, Features, opt, RM);</span></div></div>
    <p>Whether this behavior is already notified and is there any
      workaround available for it ? I would be great to know the root
      cause for this behavior.<br>
    </p>
    <p>Of course, the kaleidoscope is friendly and good introduction to
      llvm for beginners, thank you very much for developing :) <br>
    </p>
    <p>Thanks for your kind help <br>
    </p>
  </body>
</html>