Don't return false when the function's return type is a pointer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166719 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Kaelyn Uhrain 2012-10-25 21:25:08 +00:00
parent 402a4d616f
commit 50a6102397

View File

@ -1219,7 +1219,7 @@ SubstituteFormalArguments(std::map<std::string, TreePatternNode*> &ArgMap) {
/// PatFrag references.
TreePatternNode *TreePatternNode::InlinePatternFragments(TreePattern &TP) {
if (TP.hasError())
return false;
return 0;
if (isLeaf())
return this; // nothing to do.
@ -1248,7 +1248,7 @@ TreePatternNode *TreePatternNode::InlinePatternFragments(TreePattern &TP) {
if (Frag->getNumArgs() != Children.size()) {
TP.error("'" + Op->getName() + "' fragment requires " +
utostr(Frag->getNumArgs()) + " operands!");
return false;
return 0;
}
TreePatternNode *FragTree = Frag->getOnlyTree()->clone();