diff options
author | Chris Lattner <sabre@nondot.org> | 2008-03-05 18:54:05 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-03-05 18:54:05 +0000 |
commit | 37e058783948f450f26dc863a694d28146a06d78 (patch) | |
tree | c8ac9f121af67cc67e4e079c0ea8eee6aec25224 /clang/CodeGen/CGExprConstant.cpp | |
parent | ae3429f5f1287cc953f5f4cafcc99b684e9f1e96 (diff) | |
download | bcm5719-llvm-37e058783948f450f26dc863a694d28146a06d78.tar.gz bcm5719-llvm-37e058783948f450f26dc863a694d28146a06d78.zip |
remove the source location arguments to various target query methods.
llvm-svn: 47954
Diffstat (limited to 'clang/CodeGen/CGExprConstant.cpp')
-rw-r--r-- | clang/CodeGen/CGExprConstant.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/clang/CodeGen/CGExprConstant.cpp b/clang/CodeGen/CGExprConstant.cpp index 30180c17744..e2405b88f37 100644 --- a/clang/CodeGen/CGExprConstant.cpp +++ b/clang/CodeGen/CGExprConstant.cpp @@ -37,7 +37,8 @@ public: llvm::Constant *VisitStmt(Stmt *S) { CGM.WarnUnsupported(S, "constant expression"); - return llvm::UndefValue::get(CGM.getTypes().ConvertType(cast<Expr>(S)->getType())); + QualType T = cast<Expr>(S)->getType(); + return llvm::UndefValue::get(CGM.getTypes().ConvertType(T)); } llvm::Constant *VisitParenExpr(ParenExpr *PE) { @@ -314,8 +315,8 @@ public: assert(E->getType()->isIntegerType() && "Result type must be an integer!"); - uint32_t ResultWidth = static_cast<uint32_t>( - CGM.getContext().getTypeSize(E->getType(), SourceLocation())); + uint32_t ResultWidth = + static_cast<uint32_t>(CGM.getContext().getTypeSize(E->getType())); return llvm::ConstantInt::get(llvm::APInt(ResultWidth, Val)); } @@ -504,15 +505,15 @@ public: llvm::Constant *EmitSizeAlignOf(QualType TypeToSize, QualType RetType, bool isSizeOf) { std::pair<uint64_t, unsigned> Info = - CGM.getContext().getTypeInfo(TypeToSize, SourceLocation()); + CGM.getContext().getTypeInfo(TypeToSize); uint64_t Val = isSizeOf ? Info.first : Info.second; Val /= 8; // Return size in bytes, not bits. assert(RetType->isIntegerType() && "Result type must be an integer!"); - uint32_t ResultWidth = static_cast<uint32_t>( - CGM.getContext().getTypeSize(RetType, SourceLocation())); + uint32_t ResultWidth = + static_cast<uint32_t>(CGM.getContext().getTypeSize(RetType)); return llvm::ConstantInt::get(llvm::APInt(ResultWidth, Val)); } @@ -616,8 +617,7 @@ llvm::Constant *CodeGenModule::EmitConstantExpr(const Expr *E, QualType type = E->getType().getCanonicalType(); if (type->isIntegerType()) { - llvm::APSInt - Value(static_cast<uint32_t>(Context.getTypeSize(type, SourceLocation()))); + llvm::APSInt Value(static_cast<uint32_t>(Context.getTypeSize(type))); if (E->isIntegerConstantExpr(Value, Context)) { return llvm::ConstantInt::get(Value); } |