Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(237)

Side by Side Diff: src/IceIntrinsics.cpp

Issue 1197223002: Subzero: Use C++11 member initializers where practical. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Rebase Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/IceInst.cpp ('k') | src/IceLiveness.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/IceIntrinsics.cpp - Functions related to intrinsics ----===// 1 //===- subzero/src/IceIntrinsics.cpp - Functions related to intrinsics ----===//
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 // This file implements the Intrinsics utilities for matching and 10 // This file implements the Intrinsics utilities for matching and
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 } // end of anonymous namespace 218 } // end of anonymous namespace
219 219
220 Intrinsics::Intrinsics() { 220 Intrinsics::Intrinsics() {
221 for (size_t I = 0; I < IceIntrinsicsTableSize; ++I) { 221 for (size_t I = 0; I < IceIntrinsicsTableSize; ++I) {
222 const struct IceIntrinsicsEntry_ &Entry = IceIntrinsicsTable[I]; 222 const struct IceIntrinsicsEntry_ &Entry = IceIntrinsicsTable[I];
223 assert(Entry.Info.NumTypes <= kMaxIntrinsicParameters); 223 assert(Entry.Info.NumTypes <= kMaxIntrinsicParameters);
224 Map.insert(std::make_pair(IceString(Entry.IntrinsicName), Entry.Info)); 224 Map.insert(std::make_pair(IceString(Entry.IntrinsicName), Entry.Info));
225 } 225 }
226 } 226 }
227 227
228 Intrinsics::~Intrinsics() {} 228 Intrinsics::~Intrinsics() = default;
229 229
230 const Intrinsics::FullIntrinsicInfo *Intrinsics::find(const IceString &Name, 230 const Intrinsics::FullIntrinsicInfo *Intrinsics::find(const IceString &Name,
231 bool &Error) const { 231 bool &Error) const {
232 static const char LLVMPrefix[] = "llvm."; 232 static const char LLVMPrefix[] = "llvm.";
233 const size_t LLVMPrefixLen = strlen(LLVMPrefix); 233 const size_t LLVMPrefixLen = strlen(LLVMPrefix);
234 Error = false; 234 Error = false;
235 if (Name.substr(0, LLVMPrefixLen) != LLVMPrefix) 235 if (Name.substr(0, LLVMPrefixLen) != LLVMPrefix)
236 return nullptr; 236 return nullptr;
237 IceString NameSuffix = Name.substr(LLVMPrefixLen); 237 IceString NameSuffix = Name.substr(LLVMPrefixLen);
238 auto it = Map.find(NameSuffix); 238 auto it = Map.find(NameSuffix);
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 return Intrinsics::IsValidCall; 335 return Intrinsics::IsValidCall;
336 } 336 }
337 337
338 Type Intrinsics::FullIntrinsicInfo::getArgType(SizeT Index) const { 338 Type Intrinsics::FullIntrinsicInfo::getArgType(SizeT Index) const {
339 assert(NumTypes > 1); 339 assert(NumTypes > 1);
340 assert(Index + 1 < NumTypes); 340 assert(Index + 1 < NumTypes);
341 return Signature[Index + 1]; 341 return Signature[Index + 1];
342 } 342 }
343 343
344 } // end of namespace Ice 344 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceInst.cpp ('k') | src/IceLiveness.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698