OLD | NEW |
1 //===- subzero/src/IceGlobalInits.cpp - Global declarations ---------------===// | 1 //===- subzero/src/IceGlobalInits.cpp - Global declarations ---------------===// |
2 // | 2 // |
3 // The Subzero Code Generator | 3 // The Subzero Code Generator |
4 // | 4 // |
5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
7 // | 7 // |
8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
9 /// | 9 /// |
10 /// \file | 10 /// \file |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 const Intrinsics::FullIntrinsicInfo *Info) const { | 85 const Intrinsics::FullIntrinsicInfo *Info) const { |
86 if (Signature.getNumArgs() != Info->getNumArgs()) | 86 if (Signature.getNumArgs() != Info->getNumArgs()) |
87 return false; | 87 return false; |
88 for (SizeT i = 0; i < Signature.getNumArgs(); ++i) { | 88 for (SizeT i = 0; i < Signature.getNumArgs(); ++i) { |
89 if (Signature.getArgType(i) != Info->getArgType(i)) | 89 if (Signature.getArgType(i) != Info->getArgType(i)) |
90 return false; | 90 return false; |
91 } | 91 } |
92 return Signature.getReturnType() == Info->getReturnType(); | 92 return Signature.getReturnType() == Info->getReturnType(); |
93 } | 93 } |
94 | 94 |
95 IceString FunctionDeclaration::getTypeSignatureError(const GlobalContext *Ctx) { | 95 std::string |
| 96 FunctionDeclaration::getTypeSignatureError(const GlobalContext *Ctx) { |
96 std::string Buffer; | 97 std::string Buffer; |
97 llvm::raw_string_ostream StrBuf(Buffer); | 98 llvm::raw_string_ostream StrBuf(Buffer); |
98 StrBuf << "Invalid"; | 99 StrBuf << "Invalid"; |
99 bool IsIntrinsic; | 100 bool IsIntrinsic; |
100 const Intrinsics::FullIntrinsicInfo *Info = | 101 const Intrinsics::FullIntrinsicInfo *Info = |
101 getIntrinsicInfo(Ctx, &IsIntrinsic); | 102 getIntrinsicInfo(Ctx, &IsIntrinsic); |
102 if (IsIntrinsic && Info == nullptr) { | 103 if (IsIntrinsic && Info == nullptr) { |
103 StrBuf << " intrinsic name: " << getName(); | 104 StrBuf << " intrinsic name: " << getName(); |
104 return StrBuf.str(); | 105 return StrBuf.str(); |
105 } | 106 } |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 dumpType(Stream); | 238 dumpType(Stream); |
238 Stream << ")"; | 239 Stream << ")"; |
239 if (Offset != 0) { | 240 if (Offset != 0) { |
240 Stream << ", "; | 241 Stream << ", "; |
241 dumpType(Stream); | 242 dumpType(Stream); |
242 Stream << " " << Offset << ")"; | 243 Stream << " " << Offset << ")"; |
243 } | 244 } |
244 } | 245 } |
245 | 246 |
246 } // end of namespace Ice | 247 } // end of namespace Ice |
OLD | NEW |