mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-04-29 22:50:53 +03:00
create our own global context, it's been removed from LLVM
(cherry picked from commit 26a4e2bd13
)
This commit is contained in:
parent
5ec3e7d38b
commit
eaa9e8130c
4 changed files with 17 additions and 5 deletions
|
@ -36,6 +36,7 @@
|
|||
#include "llvm/MC/MCAsmInfo.h"
|
||||
#include "llvm/Target/TargetMachine.h"
|
||||
#include "llvm/Transforms/Utils/ModuleUtils.h"
|
||||
#include "llvm/Support/ManagedStatic.h"
|
||||
#include <stack>
|
||||
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
|
@ -56,6 +57,13 @@ llvm::cl::opt<llvm::GlobalVariable::ThreadLocalMode> clThreadModel(
|
|||
|
||||
Type *getTypeInfoType(Type *t, Scope *sc);
|
||||
|
||||
/******************************************************************************
|
||||
* Global context
|
||||
******************************************************************************/
|
||||
static llvm::ManagedStatic<llvm::LLVMContext> GlobalContext;
|
||||
|
||||
llvm::LLVMContext& getGlobalContext() { return *GlobalContext; }
|
||||
|
||||
/******************************************************************************
|
||||
* DYNAMIC MEMORY HELPERS
|
||||
******************************************************************************/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue