Chromium Code Reviews| Index: src/PNaClTranslator.cpp |
| diff --git a/src/PNaClTranslator.cpp b/src/PNaClTranslator.cpp |
| index d7928659619a9fe6e8d6cf5f2f7395d9f9e73f57..1fb8afbc50f865591ca073a9ea49e27913ef692e 100644 |
| --- a/src/PNaClTranslator.cpp |
| +++ b/src/PNaClTranslator.cpp |
| @@ -1598,7 +1598,7 @@ private: |
| std::string Buffer; |
| raw_string_ostream StrBuf(Buffer); |
| StrBuf << InstructionName << " address not " << PtrType |
| - << ". Found: " << *Op; |
| + << ". Found: " << Op->getType(); |
| Error(StrBuf.str()); |
| return false; |
| } |
| @@ -2689,6 +2689,10 @@ void FunctionParser::ProcessRecord() { |
| } |
| } else { |
| ReturnType = Context->getSimpleTypeByID(Values[2]); |
| + if (!isValidPointerType(Callee, "Call indirect")) { |
| + if (ReturnType != Ice::IceType_void) |
| + appendErrorInstruction(ReturnType); |
|
Jim Stichnoth
2015/09/23 20:40:06
Should you return after this error? Or fall throu
Karl
2015/09/24 21:28:22
The code in general, should error recover if possi
|
| + } |
| } |
| // Check return type. |