summaryrefslogtreecommitdiff
path: root/lib/AsmParser
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2010-07-24 23:06:59 +0000
committerEli Friedman <eli.friedman@gmail.com>2010-07-24 23:06:59 +0000
commit83b4a97060c2c0a2ab08b8755c8f0915c49fd0cb (patch)
treef32401e6de4a70db834e7e8a38888b6dac44dbe4 /lib/AsmParser
parentb30cdd830bc47067d881e00c5dbd7fdc7a94603d (diff)
downloadllvm-83b4a97060c2c0a2ab08b8755c8f0915c49fd0cb.tar.gz
llvm-83b4a97060c2c0a2ab08b8755c8f0915c49fd0cb.tar.bz2
llvm-83b4a97060c2c0a2ab08b8755c8f0915c49fd0cb.tar.xz
Revert r109361; it's impossible to write a call with an argument with an
invalid type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109365 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AsmParser')
-rw-r--r--lib/AsmParser/LLParser.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/AsmParser/LLParser.cpp b/lib/AsmParser/LLParser.cpp
index 2c51e9f512..61b1ae5e97 100644
--- a/lib/AsmParser/LLParser.cpp
+++ b/lib/AsmParser/LLParser.cpp
@@ -3710,12 +3710,8 @@ bool LLParser::ParseCall(Instruction *&Inst, PerFunctionState &PFS,
!(Ty = dyn_cast<FunctionType>(PFTy->getElementType()))) {
// Pull out the types of all of the arguments...
std::vector<const Type*> ParamTypes;
- for (unsigned i = 0, e = ArgList.size(); i != e; ++i) {
- const Type* ArgTy = ArgList[i].V->getType();
- if (!FunctionType::isValidArgumentType(ArgTy))
- return Error(ArgList[i].Loc, "Invalid argument type for LLVM function");
- ParamTypes.push_back(ArgTy);
- }
+ for (unsigned i = 0, e = ArgList.size(); i != e; ++i)
+ ParamTypes.push_back(ArgList[i].V->getType());
if (!FunctionType::isValidReturnType(RetType))
return Error(RetTypeLoc, "Invalid result type for LLVM function");