Mercurial > hg > CbC > CbC_llvm
diff llvm/lib/IR/LLVMContextImpl.cpp @ 224:292f64a68d8a
merged
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 19 Jul 2021 03:29:25 +0900 |
parents | 286fdf80b38c 5f17cb93ff66 |
children | 21e6aa2e49ef |
line wrap: on
line diff
--- a/llvm/lib/IR/LLVMContextImpl.cpp Sat Jul 17 15:20:00 2021 +0900 +++ b/llvm/lib/IR/LLVMContextImpl.cpp Mon Jul 19 03:29:25 2021 +0900 @@ -15,36 +15,32 @@ #include "llvm/IR/Module.h" #include "llvm/IR/OptBisect.h" #include "llvm/IR/Type.h" +#include "llvm/Support/CommandLine.h" #include "llvm/Support/ManagedStatic.h" #include <cassert> #include <utility> using namespace llvm; +static cl::opt<bool> + ForceOpaquePointersCL("force-opaque-pointers", + cl::desc("Force all pointers to be opaque pointers"), + cl::init(false)); + LLVMContextImpl::LLVMContextImpl(LLVMContext &C) - : DiagHandler(std::make_unique<DiagnosticHandler>()), - VoidTy(C, Type::VoidTyID), - LabelTy(C, Type::LabelTyID), - HalfTy(C, Type::HalfTyID), - BFloatTy(C, Type::BFloatTyID), - FloatTy(C, Type::FloatTyID), - DoubleTy(C, Type::DoubleTyID), - MetadataTy(C, Type::MetadataTyID), - TokenTy(C, Type::TokenTyID), - X86_FP80Ty(C, Type::X86_FP80TyID), - FP128Ty(C, Type::FP128TyID), - PPC_FP128Ty(C, Type::PPC_FP128TyID), - X86_MMXTy(C, Type::X86_MMXTyID), - X86_AMXTy(C, Type::X86_AMXTyID), + : DiagHandler(std::make_unique<DiagnosticHandler>()), + VoidTy(C, Type::VoidTyID), LabelTy(C, Type::LabelTyID), + HalfTy(C, Type::HalfTyID), BFloatTy(C, Type::BFloatTyID), + FloatTy(C, Type::FloatTyID), DoubleTy(C, Type::DoubleTyID), + MetadataTy(C, Type::MetadataTyID), TokenTy(C, Type::TokenTyID), + X86_FP80Ty(C, Type::X86_FP80TyID), FP128Ty(C, Type::FP128TyID), + PPC_FP128Ty(C, Type::PPC_FP128TyID), X86_MMXTy(C, Type::X86_MMXTyID), #ifndef noCbC __CodeTy(C, Type::__CodeTyID), #endif - Int1Ty(C, 1), - Int8Ty(C, 8), - Int16Ty(C, 16), - Int32Ty(C, 32), - Int64Ty(C, 64), - Int128Ty(C, 128) {} + X86_AMXTy(C, Type::X86_AMXTyID), Int1Ty(C, 1), Int8Ty(C, 8), + Int16Ty(C, 16), Int32Ty(C, 32), Int64Ty(C, 64), Int128Ty(C, 128), + ForceOpaquePointers(ForceOpaquePointersCL) {} LLVMContextImpl::~LLVMContextImpl() { // NOTE: We need to delete the contents of OwnedModules, but Module's dtor