Index: include/llvm/IR/LLVMContext.h =================================================================== --- include/llvm/IR/LLVMContext.h +++ include/llvm/IR/LLVMContext.h @@ -60,7 +60,8 @@ MD_mem_parallel_loop_access = 10, // "llvm.mem.parallel_loop_access" MD_nonnull = 11, // "nonnull" MD_dereferenceable = 12, // "dereferenceable" - MD_dereferenceable_or_null = 13 // "dereferenceable_or_null" + MD_dereferenceable_or_null = 13, // "dereferenceable_or_null" + MD_make_implicit = 14 // "make.implicit" }; /// getMDKindID - Return a unique non-zero ID for the specified metadata kind. Index: lib/CodeGen/ImplicitNullChecks.cpp =================================================================== --- lib/CodeGen/ImplicitNullChecks.cpp +++ lib/CodeGen/ImplicitNullChecks.cpp @@ -38,6 +38,7 @@ #include "llvm/CodeGen/MachineModuleInfo.h" #include "llvm/IR/BasicBlock.h" #include "llvm/IR/Instruction.h" +#include "llvm/IR/LLVMContext.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/Debug.h" #include "llvm/Target/TargetSubtargetInfo.h" @@ -134,7 +135,7 @@ MDNode *BranchMD = MBB.getBasicBlock() - ? MBB.getBasicBlock()->getTerminator()->getMetadata("make.implicit") + ? MBB.getBasicBlock()->getTerminator()->getMetadata(LLVMContext::MD_make_implicit) : nullptr; if (!BranchMD) return false;