<div dir="ltr"><div dir="ltr"><div>Hi,</div><div><br></div><div>getGlobalContext() has been removed a few years ago.</div><div>You need to manage the lifetime of the context yourself. If you want to get the previous behavior, you can likely just add to your project:</div><div><br></div><div>LLVMContext &getGlobalContext() {</div><div>  static LLVMContext context;</div><div>  return context;</div><div>}</div><div><br></div><div>-- </div><div>Mehdi</div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jan 25, 2020 at 4:52 PM Abid Malik via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:"courier new",monospace;font-size:small">Hello,</div><div class="gmail_default" style="font-family:"courier new",monospace;font-size:small"><br></div><div class="gmail_default" style="font-family:"courier new",monospace;font-size:small">Is getGlobalContext() still available? I could not find it in the LLVMContext.h.</div><div class="gmail_default" style="font-family:"courier new",monospace;font-size:small"><br></div><div class="gmail_default" style="font-family:"courier new",monospace;font-size:small">I am trying to initialize the context as :</div><div class="gmail_default" style="font-family:"courier new",monospace;font-size:small"><br></div><div>static LLVMContext &Context;<br><br>static Module *ModuleOb = new Module("<span class="gmail_default" style="font-family:"courier new",monospace;font-size:small">test</span> compiler", Context);<br></div><div><br></div><div><div class="gmail_default" style="font-family:"courier new",monospace;font-size:small">and getting an error:</div><div class="gmail_default" style="font-family:"courier new",monospace;font-size:small"><br></div><div class="gmail_default" style="font-family:"courier new",monospace;font-size:small"> error: use of undeclared identifier 'getGlobalContext'<br>static LLVMContext &Context = getGlobalContext();<br></div><div class="gmail_default" style="font-family:"courier new",monospace;font-size:small"><br></div><div class="gmail_default" style="font-family:"courier new",monospace;font-size:small">Thanks,</div><div class="gmail_default" style="font-family:"courier new",monospace;font-size:small"></div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div>Abid M. Malik<br>******************************************************<br>"I have learned silence from the talkative, toleration from the intolerant, and kindness from the unkind"---Gibran<br>"Success is not for the chosen few, but for the few who choose" --- John Maxwell<br>"Being a good person does not depend on your religion or status in life, your race or skin color, political views or culture. IT DEPENDS ON HOW GOOD YOU TREAT OTHERS"--- Abid<br>"The Universe is talking to us, and the language of the Universe is mathematics."----Abid<br> </div></div></div></div>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>