[llvm-commits] [llvm] r101866 - in /llvm/trunk: lib/AsmParser/LLParser.cpp test/Bitcode/memcpy.ll
Chris Lattner
sabre at nondot.org
Mon Apr 19 21:49:11 PDT 2010
Author: lattner
Date: Mon Apr 19 23:49:11 2010
New Revision: 101866
URL: http://llvm.org/viewvc/llvm-project?rev=101866&view=rev
Log:
reapply 'reject forward references to functions whose type don't match'
now that the testsuite has been updated.
Modified:
llvm/trunk/lib/AsmParser/LLParser.cpp
llvm/trunk/test/Bitcode/memcpy.ll
Modified: llvm/trunk/lib/AsmParser/LLParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/LLParser.cpp?rev=101866&r1=101865&r2=101866&view=diff
==============================================================================
--- llvm/trunk/lib/AsmParser/LLParser.cpp (original)
+++ llvm/trunk/lib/AsmParser/LLParser.cpp Mon Apr 19 23:49:11 2010
@@ -2787,6 +2787,10 @@
ForwardRefVals.find(FunctionName);
if (FRVI != ForwardRefVals.end()) {
Fn = M->getFunction(FunctionName);
+ if (Fn->getType() != PFT)
+ return Error(FRVI->second.second, "invalid forward reference to "
+ "function '" + FunctionName + "' with wrong type!");
+
ForwardRefVals.erase(FRVI);
} else if ((Fn = M->getFunction(FunctionName))) {
// If this function already exists in the symbol table, then it is
Modified: llvm/trunk/test/Bitcode/memcpy.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Bitcode/memcpy.ll?rev=101866&r1=101865&r2=101866&view=diff
==============================================================================
--- llvm/trunk/test/Bitcode/memcpy.ll (original)
+++ llvm/trunk/test/Bitcode/memcpy.ll Mon Apr 19 23:49:11 2010
@@ -20,4 +20,4 @@
declare void @llvm.memmove.i32(i8*, i8*, i32, i32)
-declare void @llvm.memmove.i64(i8*, i8*, i32, i32)
+declare void @llvm.memmove.i64(i8*, i8*, i64, i32)
More information about the llvm-commits
mailing list