Index: test/Bindings/llvm-c/echo.ll =================================================================== --- test/Bindings/llvm-c/echo.ll +++ test/Bindings/llvm-c/echo.ll @@ -21,6 +21,7 @@ @protected = protected global i32 23 @section = global i32 27, section ".custom" @align = global i32 31, align 4 +@nullptr = global i32* null @aliased1 = alias i32, i32* @var @aliased2 = internal alias i32, i32* @var Index: tools/llvm-c-test/echo.cpp =================================================================== --- tools/llvm-c-test/echo.cpp +++ tools/llvm-c-test/echo.cpp @@ -326,6 +326,13 @@ EltCount, LLVMIsPackedStruct(Ty)); } + // Try ConstantPointerNull + if (LLVMIsAConstantPointerNull(Cst)) { + check_value_kind(Cst, LLVMConstantPointerNullValueKind); + LLVMTypeRef Ty = TypeCloner(M).Clone(Cst); + return LLVMConstNull(Ty); + } + // Try undef if (LLVMIsUndef(Cst)) { check_value_kind(Cst, LLVMUndefValueValueKind);