llvmpipe: Detect typos in LLVM intrinsics early.
authorJosé Fonseca <jfonseca@vmware.com>
Sun, 16 Aug 2009 20:00:16 +0000 (21:00 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Sat, 29 Aug 2009 08:21:33 +0000 (09:21 +0100)
src/gallium/drivers/llvmpipe/lp_bld_intr.c

index a2051211b7a13780cee70150c22d7101db207b11..4f03ce7d0a999eced87bfc8c1334cda7b2e70441 100644 (file)
@@ -76,6 +76,13 @@ lp_build_intrinsic(LLVMBuilderRef builder,
    }
    assert(LLVMIsDeclaration(function));
 
+   if(name[0] == 'l' &&
+      name[1] == 'l' &&
+      name[2] == 'v' &&
+      name[3] == 'm' &&
+      name[4] == '.')
+      assert(LLVMGetIntrinsicID(function));
+
    return LLVMBuildCall(builder, function, args, num_args, "");
 }