summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGStmt.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-02-08 22:53:07 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-02-08 22:53:07 +0000
commit3d33fab7fc3d7d30631bca3376a8c2d6f598110e (patch)
tree83279a029a78de0660b63eaa9c8a965f9b4201b5 /clang/lib/CodeGen/CGStmt.cpp
parent99777dd78f06b3520bd596e34d2eea14cb862c88 (diff)
downloadbcm5719-llvm-3d33fab7fc3d7d30631bca3376a8c2d6f598110e.tar.gz
bcm5719-llvm-3d33fab7fc3d7d30631bca3376a8c2d6f598110e.zip
Reapply r95393, without the change to CGExpr. I was wrong in assuming that the
element type always matched the converted LLVM type for ExprType. llvm-svn: 95596
Diffstat (limited to 'clang/lib/CodeGen/CGStmt.cpp')
-rw-r--r--clang/lib/CodeGen/CGStmt.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGStmt.cpp b/clang/lib/CodeGen/CGStmt.cpp
index 7ea8b08c238..008a480b9c1 100644
--- a/clang/lib/CodeGen/CGStmt.cpp
+++ b/clang/lib/CodeGen/CGStmt.cpp
@@ -861,14 +861,13 @@ llvm::Value* CodeGenFunction::EmitAsmInput(const AsmStmt &S,
std::string &ConstraintStr) {
llvm::Value *Arg;
if (Info.allowsRegister() || !Info.allowsMemory()) {
- const llvm::Type *Ty = ConvertType(InputExpr->getType());
-
- if (Ty->isSingleValueType()) {
+ if (!CodeGenFunction::hasAggregateLLVMType(InputExpr->getType())) {
Arg = EmitScalarExpr(InputExpr);
} else {
InputExpr = InputExpr->IgnoreParenNoopCasts(getContext());
LValue Dest = EmitLValue(InputExpr);
+ const llvm::Type *Ty = ConvertType(InputExpr->getType());
uint64_t Size = CGM.getTargetData().getTypeSizeInBits(Ty);
if (Size <= 64 && llvm::isPowerOf2_64(Size)) {
Ty = llvm::IntegerType::get(VMContext, Size);
OpenPOWER on IntegriCloud