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

Side by Side Diff: include/llvm/Analysis/NaCl/PNaClABITypeChecker.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 //===- PNaClABITypeChecker.h - Verify PNaCl ABI rules -----------*- C++ -*-===// 1 //===- PNaClABITypeChecker.h - Verify PNaCl ABI rules -----------*- C++ -*-===//
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 // Common type-checking code for module and function-level passes 10 // Common type-checking code for module and function-level passes
11 // 11 //
12 // 12 //
13 //===----------------------------------------------------------------------===// 13 //===----------------------------------------------------------------------===//
14 14
15 #ifndef LLVM_ANALYSIS_NACL_PNACLABITYPECHECKER_H 15 #ifndef LLVM_ANALYSIS_NACL_PNACLABITYPECHECKER_H
16 #define LLVM_ANALYSIS_NACL_PNACLABITYPECHECKER_H 16 #define LLVM_ANALYSIS_NACL_PNACLABITYPECHECKER_H
17 17
18 #include "llvm/ADT/DenseSet.h" 18 #include "llvm/ADT/DenseSet.h"
19 #include "llvm/IR/Type.h" 19 #include "llvm/IR/Type.h"
20 #include "llvm/Support/raw_ostream.h" 20 #include "llvm/Support/raw_ostream.h"
21 21
22 namespace llvm { 22 namespace llvm {
23 class FunctionType; 23 class FunctionType;
24 24
25 class PNaClABITypeChecker { 25 class PNaClABITypeChecker {
26 PNaClABITypeChecker(const PNaClABITypeChecker&) LLVM_DELETED_FUNCTION; 26 PNaClABITypeChecker(const PNaClABITypeChecker&) = delete;
27 void operator=(const PNaClABITypeChecker&) LLVM_DELETED_FUNCTION; 27 void operator=(const PNaClABITypeChecker&) = delete;
28 public: 28 public:
29 // Returns true if Ty is a valid argument or return value type for PNaCl. 29 // Returns true if Ty is a valid argument or return value type for PNaCl.
30 static bool isValidParamType(const Type *Ty); 30 static bool isValidParamType(const Type *Ty);
31 31
32 // Returns true if Ty is a valid function type for PNaCl. 32 // Returns true if Ty is a valid function type for PNaCl.
33 static bool isValidFunctionType(const FunctionType *FTy); 33 static bool isValidFunctionType(const FunctionType *FTy);
34 34
35 // Returns true if Ty is a valid non-derived type for PNaCl. 35 // Returns true if Ty is a valid non-derived type for PNaCl.
36 static bool isValidScalarType(const Type *Ty); 36 static bool isValidScalarType(const Type *Ty);
37 37
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 static bool IsPointerEquivType(Type *T1, Type *T2) { 71 static bool IsPointerEquivType(Type *T1, Type *T2) {
72 if (T1->isPointerTy()) return T2->isIntegerTy(32); 72 if (T1->isPointerTy()) return T2->isIntegerTy(32);
73 if (T2->isPointerTy()) return T1->isIntegerTy(32); 73 if (T2->isPointerTy()) return T1->isIntegerTy(32);
74 return T1 == T2; 74 return T1 == T2;
75 } 75 }
76 76
77 }; 77 };
78 } // namespace llvm 78 } // namespace llvm
79 79
80 #endif // LLVM_ANALYSIS_NACL_PNACLABITYPECHECKER_H 80 #endif // LLVM_ANALYSIS_NACL_PNACLABITYPECHECKER_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698