summaryrefslogtreecommitdiffstats
path: root/clang/CodeGen/CGExprScalar.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-03-05 18:54:05 +0000
committerChris Lattner <sabre@nondot.org>2008-03-05 18:54:05 +0000
commit37e058783948f450f26dc863a694d28146a06d78 (patch)
treec8ac9f121af67cc67e4e079c0ea8eee6aec25224 /clang/CodeGen/CGExprScalar.cpp
parentae3429f5f1287cc953f5f4cafcc99b684e9f1e96 (diff)
downloadbcm5719-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/CGExprScalar.cpp')
-rw-r--r--clang/CodeGen/CGExprScalar.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/clang/CodeGen/CGExprScalar.cpp b/clang/CodeGen/CGExprScalar.cpp
index 52b022b6611..892712a0d4c 100644
--- a/clang/CodeGen/CGExprScalar.cpp
+++ b/clang/CodeGen/CGExprScalar.cpp
@@ -656,16 +656,14 @@ Value *ScalarExprEmitter::EmitSizeAlignOf(QualType TypeToSize,
QualType RetType,bool isSizeOf){
assert(RetType->isIntegerType() && "Result type must be an integer!");
uint32_t ResultWidth =
- static_cast<uint32_t>(CGF.getContext().getTypeSize(RetType,
- SourceLocation()));
+ static_cast<uint32_t>(CGF.getContext().getTypeSize(RetType));
// sizeof(void) and __alignof__(void) = 1 as a gcc extension.
if (TypeToSize->isVoidType())
return llvm::ConstantInt::get(llvm::APInt(ResultWidth, 1));
/// FIXME: This doesn't handle VLAs yet!
- std::pair<uint64_t, unsigned> Info =
- CGF.getContext().getTypeInfo(TypeToSize, SourceLocation());
+ std::pair<uint64_t, unsigned> Info = CGF.getContext().getTypeInfo(TypeToSize);
uint64_t Val = isSizeOf ? Info.first : Info.second;
Val /= 8; // Return size in bytes, not bits.
@@ -696,8 +694,8 @@ Value *ScalarExprEmitter::VisitUnaryOffsetOf(const UnaryOperator *E)
assert(E->getType()->isIntegerType() && "Result type must be an integer!");
- uint32_t ResultWidth = static_cast<uint32_t>(
- CGF.getContext().getTypeSize(E->getType(), SourceLocation()));
+ uint32_t ResultWidth =
+ static_cast<uint32_t>(CGF.getContext().getTypeSize(E->getType()));
return llvm::ConstantInt::get(llvm::APInt(ResultWidth, Val));
}
@@ -852,8 +850,7 @@ Value *ScalarExprEmitter::VisitBinSub(const BinaryOperator *E) {
const QualType LHSType = E->getLHS()->getType().getCanonicalType();
const QualType LHSElementType = cast<PointerType>(LHSType)->getPointeeType();
- uint64_t ElementSize = CGF.getContext().getTypeSize(LHSElementType,
- SourceLocation()) / 8;
+ uint64_t ElementSize = CGF.getContext().getTypeSize(LHSElementType) / 8;
const llvm::Type *ResultType = ConvertType(E->getType());
LHS = Builder.CreatePtrToInt(LHS, ResultType, "sub.ptr.lhs.cast");
OpenPOWER on IntegriCloud