Index: lib/IR/Verifier.cpp =================================================================== --- lib/IR/Verifier.cpp +++ lib/IR/Verifier.cpp @@ -3385,7 +3385,11 @@ &CI); // gc_relocate does not need to be the same type as the relocated pointer. - // It can casted to the correct type later if it's desired + // It can casted to the correct type later if it's desired. However, it + // must be a pointer type + Assert(CI.getType()->isPointerTy(), + "gc.relocate: relocating a pointer should always return a pointer", &CI); + break; } };