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

Side by Side Diff: src/IceIntrinsics.cpp

Issue 1766233002: Subzero: Fix symbol name mangling. Make flags global. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review changes Created 4 years, 9 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/IceInstMIPS32.cpp ('k') | src/IceMangling.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 /// \file 10 /// \file
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 229
230 Intrinsics::~Intrinsics() = default; 230 Intrinsics::~Intrinsics() = default;
231 231
232 const Intrinsics::FullIntrinsicInfo *Intrinsics::find(const IceString &Name, 232 const Intrinsics::FullIntrinsicInfo *Intrinsics::find(const IceString &Name,
233 bool &Error) const { 233 bool &Error) const {
234 static const char LLVMPrefix[] = "llvm."; 234 static const char LLVMPrefix[] = "llvm.";
235 const size_t LLVMPrefixLen = strlen(LLVMPrefix); 235 const size_t LLVMPrefixLen = strlen(LLVMPrefix);
236 Error = false; 236 Error = false;
237 if (Name.substr(0, LLVMPrefixLen) != LLVMPrefix) 237 if (Name.substr(0, LLVMPrefixLen) != LLVMPrefix)
238 return nullptr; 238 return nullptr;
239 IceString NameSuffix = Name.substr(LLVMPrefixLen); 239 const IceString NameSuffix = Name.substr(LLVMPrefixLen);
240 auto it = Map.find(NameSuffix); 240 auto it = Map.find(NameSuffix);
241 if (it == Map.end()) { 241 if (it == Map.end()) {
242 Error = true; 242 Error = true;
243 return nullptr; 243 return nullptr;
244 } 244 }
245 return &it->second; 245 return &it->second;
246 } 246 }
247 247
248 namespace { 248 namespace {
249 249
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 return Intrinsics::IsValidCall; 337 return Intrinsics::IsValidCall;
338 } 338 }
339 339
340 Type Intrinsics::FullIntrinsicInfo::getArgType(SizeT Index) const { 340 Type Intrinsics::FullIntrinsicInfo::getArgType(SizeT Index) const {
341 assert(NumTypes > 1); 341 assert(NumTypes > 1);
342 assert(Index + 1 < NumTypes); 342 assert(Index + 1 < NumTypes);
343 return Signature[Index + 1]; 343 return Signature[Index + 1];
344 } 344 }
345 345
346 } // end of namespace Ice 346 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceInstMIPS32.cpp ('k') | src/IceMangling.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698