OLD | NEW |
1 //===- PNaClABIProps.h - Verify PNaCl ABI Properties ----------------------===// | 1 //===- PNaClABIProps.h - Verify PNaCl ABI Properties ----------------------===// |
2 // | 2 // |
3 // The LLVM Compiler Infrastructure | 3 // The LLVM Compiler Infrastructure |
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 // Verify PNaCl ABI properties. | 10 // Verify PNaCl ABI properties. |
(...skipping 11 matching lines...) Expand all Loading... |
22 | 22 |
23 namespace llvm { | 23 namespace llvm { |
24 | 24 |
25 class NamedMDNode; | 25 class NamedMDNode; |
26 class DataLayout; | 26 class DataLayout; |
27 | 27 |
28 // Checks properties needed to verify IR constructs. Unlike | 28 // Checks properties needed to verify IR constructs. Unlike |
29 // PNaClABIVerifyFunctions and PNaClABIVerifyModule, this class is | 29 // PNaClABIVerifyFunctions and PNaClABIVerifyModule, this class is |
30 // pass-free, and checks individual elements within IR. | 30 // pass-free, and checks individual elements within IR. |
31 class PNaClABIProps { | 31 class PNaClABIProps { |
32 PNaClABIProps(const PNaClABIProps&) LLVM_DELETED_FUNCTION; | 32 PNaClABIProps(const PNaClABIProps&) = delete; |
33 void operator=(const PNaClABIProps&) LLVM_DELETED_FUNCTION; | 33 void operator=(const PNaClABIProps&) = delete; |
34 public: | 34 public: |
35 // Returns true if metadata kind MDKind is allowed. | 35 // Returns true if metadata kind MDKind is allowed. |
36 static bool isWhitelistedMetadata(unsigned MDKind); | 36 static bool isWhitelistedMetadata(unsigned MDKind); |
37 // Returns true if metadata is allowed. | 37 // Returns true if metadata is allowed. |
38 static bool isWhitelistedMetadata(const NamedMDNode *MD); | 38 static bool isWhitelistedMetadata(const NamedMDNode *MD); |
39 // Returns true if integer constant Idx is in [0..NumElements). | 39 // Returns true if integer constant Idx is in [0..NumElements). |
40 static bool isVectorIndexSafe(const APInt &Idx, | 40 static bool isVectorIndexSafe(const APInt &Idx, |
41 unsigned NumElements) { | 41 unsigned NumElements) { |
42 return Idx.ult(NumElements); | 42 return Idx.ult(NumElements); |
43 } | 43 } |
(...skipping 27 matching lines...) Expand all Loading... |
71 static bool isValidGlobalLinkage(GlobalValue::LinkageTypes Linkage); | 71 static bool isValidGlobalLinkage(GlobalValue::LinkageTypes Linkage); |
72 // Returns kind of global value name, based on IsFunction. | 72 // Returns kind of global value name, based on IsFunction. |
73 static const char *GVTypeName(bool IsFunction) { | 73 static const char *GVTypeName(bool IsFunction) { |
74 return IsFunction ? "Function" : "Variable"; | 74 return IsFunction ? "Function" : "Variable"; |
75 } | 75 } |
76 }; | 76 }; |
77 | 77 |
78 } | 78 } |
79 | 79 |
80 #endif // LLVM_ANALYSIS_NACL_PNACLABIPROPS_H | 80 #endif // LLVM_ANALYSIS_NACL_PNACLABIPROPS_H |
OLD | NEW |