[llvm-commits] [dragonegg] r90232 - in /dragonegg/trunk: llvm-backend.cpp llvm-convert.cpp
Duncan Sands
baldrick at free.fr
Tue Dec 1 05:50:12 PST 2009
Author: baldrick
Date: Tue Dec 1 07:50:11 2009
New Revision: 90232
URL: http://llvm.org/viewvc/llvm-project?rev=90232&view=rev
Log:
Use !AGGREGATE_TYPE_P in preference to Ty->isSingleValueType() in a
few places where making fewer assumptions on how types are converted
seems wise.
Modified:
dragonegg/trunk/llvm-backend.cpp
dragonegg/trunk/llvm-convert.cpp
Modified: dragonegg/trunk/llvm-backend.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/llvm-backend.cpp?rev=90232&r1=90231&r2=90232&view=diff
==============================================================================
--- dragonegg/trunk/llvm-backend.cpp (original)
+++ dragonegg/trunk/llvm-backend.cpp Tue Dec 1 07:50:11 2009
@@ -1267,7 +1267,6 @@
/// false.
bool ValidateRegisterVariable(tree decl) {
int RegNumber = decode_reg_name(extractRegisterName(decl));
- const Type *Ty = ConvertType(TREE_TYPE(decl));
if (errorcount || sorrycount)
return true; // Do not process broken code.
@@ -1286,7 +1285,7 @@
#endif
else if (DECL_INITIAL(decl) != 0 && TREE_STATIC(decl))
error("global register variable has initial value");
- else if (!Ty->isSingleValueType())
+ else if (AGGREGATE_TYPE_P(TREE_TYPE(decl)))
sorry("%JLLVM cannot handle register variable %qD, report a bug",
decl, decl);
else {
Modified: dragonegg/trunk/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/llvm-convert.cpp?rev=90232&r1=90231&r2=90232&view=diff
==============================================================================
--- dragonegg/trunk/llvm-convert.cpp (original)
+++ dragonegg/trunk/llvm-convert.cpp Tue Dec 1 07:50:11 2009
@@ -6965,7 +6965,7 @@
return BuildVector(BuildVecOps);
}
- assert(!Ty->isSingleValueType() && "Constructor for scalar type??");
+ assert(AGGREGATE_TYPE_P(type) && "Constructor for scalar type??");
// Start out with the value zero'd out.
EmitAggregateZero(*DestLoc, type);
@@ -6993,7 +6993,7 @@
if (!tree_purpose)
return 0; // Not actually initialized?
- if (!ConvertType(TREE_TYPE(tree_purpose))->isSingleValueType()) {
+ if (AGGREGATE_TYPE_P(TREE_TYPE(tree_purpose))) {
Value *V = Emit(tree_value, DestLoc);
(void)V;
assert(V == 0 && "Aggregate value returned in a register?");
More information about the llvm-commits
mailing list