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

Side by Side Diff: include/llvm/Analysis/NaCl/PNaClABIProps.h

Issue 1151093004: Changes from 3.7 merge to files not in upstream (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-llvm.git@master
Patch Set: Created 5 years, 7 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
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698