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

Side by Side Diff: src/IceIntrinsics.cpp

Issue 618313003: Subzero: Move to C++11 static_assert(). (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 6 years, 2 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/IceDefs.h ('k') | src/IceTargetLoweringX8632.cpp » ('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
11 // then dispatching by name. 11 // then dispatching by name.
12 // 12 //
13 //===----------------------------------------------------------------------===// 13 //===----------------------------------------------------------------------===//
14 14
15 #include "IceCfg.h" 15 #include "IceCfg.h"
16 #include "IceCfgNode.h" 16 #include "IceCfgNode.h"
17 #include "IceInst.h" 17 #include "IceInst.h"
18 #include "IceIntrinsics.h" 18 #include "IceIntrinsics.h"
19 #include "IceLiveness.h" 19 #include "IceLiveness.h"
20 #include "IceOperand.h" 20 #include "IceOperand.h"
21 21
22 #include <utility> 22 #include <utility>
23 23
24 namespace Ice { 24 namespace Ice {
25 25
26 namespace { 26 namespace {
27 27
28 void __attribute__((unused)) xIntrinsicInfoSizeCheck() { 28 void __attribute__((unused)) xIntrinsicInfoSizeCheck() {
29 STATIC_ASSERT(sizeof(Intrinsics::IntrinsicInfo) == 4); 29 static_assert(sizeof(Intrinsics::IntrinsicInfo) == 4,
jvoung (off chromium) 2014/10/01 17:32:53 Does static_assert() need to be wrapped in a unuse
Jim Stichnoth 2014/10/01 20:02:41 Good point. I removed the dummy function wrappers
30 "Unexpected sizeof(IntrinsicInfo)");
30 } 31 }
31 32
32 #define INTRIN(ID, SE, RT) { Intrinsics::ID, Intrinsics::SE, Intrinsics::RT } 33 #define INTRIN(ID, SE, RT) { Intrinsics::ID, Intrinsics::SE, Intrinsics::RT }
33 34
34 // Build list of intrinsics with their attributes and expected prototypes. 35 // Build list of intrinsics with their attributes and expected prototypes.
35 // List is sorted alphabetically. 36 // List is sorted alphabetically.
36 const struct IceIntrinsicsEntry_ { 37 const struct IceIntrinsicsEntry_ {
37 Intrinsics::FullIntrinsicInfo Info; 38 Intrinsics::FullIntrinsicInfo Info;
38 const char *IntrinsicName; 39 const char *IntrinsicName;
39 } IceIntrinsicsTable[] = { 40 } IceIntrinsicsTable[] = {
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 return Intrinsics::IsValidCall; 251 return Intrinsics::IsValidCall;
251 } 252 }
252 253
253 Type Intrinsics::FullIntrinsicInfo::getArgType(SizeT Index) const { 254 Type Intrinsics::FullIntrinsicInfo::getArgType(SizeT Index) const {
254 assert(NumTypes > 1); 255 assert(NumTypes > 1);
255 assert(Index + 1 < NumTypes); 256 assert(Index + 1 < NumTypes);
256 return Signature[Index + 1]; 257 return Signature[Index + 1];
257 } 258 }
258 259
259 } // end of namespace Ice 260 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceDefs.h ('k') | src/IceTargetLoweringX8632.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698