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

Side by Side Diff: include/llvm/IR/InstrTypes.h

Issue 939073008: Rebased PNaCl localmods in LLVM to 223109 (Closed)
Patch Set: undo localmod Created 5 years, 10 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 | « include/llvm/IR/InlineAsm.h ('k') | include/llvm/IR/Intrinsics.td » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===-- llvm/InstrTypes.h - Important Instruction subclasses ----*- C++ -*-===// 1 //===-- llvm/InstrTypes.h - Important Instruction subclasses ----*- 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 // This file defines various meta classes of instructions that exist in the VM 10 // This file defines various meta classes of instructions that exist in the VM
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 649
650 /// @brief Return the source type, as a convenience 650 /// @brief Return the source type, as a convenience
651 Type* getSrcTy() const { return getOperand(0)->getType(); } 651 Type* getSrcTy() const { return getOperand(0)->getType(); }
652 /// @brief Return the destination type, as a convenience 652 /// @brief Return the destination type, as a convenience
653 Type* getDestTy() const { return getType(); } 653 Type* getDestTy() const { return getType(); }
654 654
655 /// This method can be used to determine if a cast from S to DstTy using 655 /// This method can be used to determine if a cast from S to DstTy using
656 /// Opcode op is valid or not. 656 /// Opcode op is valid or not.
657 /// @returns true iff the proposed cast is valid. 657 /// @returns true iff the proposed cast is valid.
658 /// @brief Determine if a cast is valid without creating one. 658 /// @brief Determine if a cast is valid without creating one.
659 static bool castIsValid(Instruction::CastOps op, Value *S, Type *DstTy); 659 // @LOCALMOD-BEGIN
660 static bool castIsValid(Instruction::CastOps op, Type *SrcTy, Type *DstTy);
661
662 static bool castIsValid(Instruction::CastOps op, Value *S, Type *DstTy) {
663 return castIsValid(op, S->getType(), DstTy);
664 }
665 // @LOCALMOD-END
660 666
661 /// @brief Methods for support type inquiry through isa, cast, and dyn_cast: 667 /// @brief Methods for support type inquiry through isa, cast, and dyn_cast:
662 static inline bool classof(const Instruction *I) { 668 static inline bool classof(const Instruction *I) {
663 return I->isCast(); 669 return I->isCast();
664 } 670 }
665 static inline bool classof(const Value *V) { 671 static inline bool classof(const Value *V) {
666 return isa<Instruction>(V) && classof(cast<Instruction>(V)); 672 return isa<Instruction>(V) && classof(cast<Instruction>(V));
667 } 673 }
668 }; 674 };
669 675
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
891 // FIXME: these are redundant if CmpInst < BinaryOperator 897 // FIXME: these are redundant if CmpInst < BinaryOperator
892 template <> 898 template <>
893 struct OperandTraits<CmpInst> : public FixedNumOperandTraits<CmpInst, 2> { 899 struct OperandTraits<CmpInst> : public FixedNumOperandTraits<CmpInst, 2> {
894 }; 900 };
895 901
896 DEFINE_TRANSPARENT_OPERAND_ACCESSORS(CmpInst, Value) 902 DEFINE_TRANSPARENT_OPERAND_ACCESSORS(CmpInst, Value)
897 903
898 } // End llvm namespace 904 } // End llvm namespace
899 905
900 #endif 906 #endif
OLDNEW
« no previous file with comments | « include/llvm/IR/InlineAsm.h ('k') | include/llvm/IR/Intrinsics.td » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698