[llvm-commits] CVS: llvm-java/lib/Compiler/Compiler.cpp
Alkis Evlogimenos
alkis at cs.uiuc.edu
Fri Mar 25 22:11:06 PST 2005
Changes in directory llvm-java/lib/Compiler:
Compiler.cpp updated: 1.248 -> 1.249
---
Log message:
Now that ConstantString becomes an llvm::Constant as well, we can
initialize class static variables with them.
---
Diffs of the changes: (+2 -5)
Compiler.cpp | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
Index: llvm-java/lib/Compiler/Compiler.cpp
diff -u llvm-java/lib/Compiler/Compiler.cpp:1.248 llvm-java/lib/Compiler/Compiler.cpp:1.249
--- llvm-java/lib/Compiler/Compiler.cpp:1.248 Fri Mar 25 23:39:05 2005
+++ llvm-java/lib/Compiler/Compiler.cpp Sat Mar 26 00:10:56 2005
@@ -1340,11 +1340,8 @@
if (field->getConstantValueAttribute()) {
Constant* constant =
field->getConstantValueAttribute()->getValue();
- if (!dynamic_cast<ConstantString*>(constant)) {
- init = ConstantExpr::getCast(
- dyn_cast<llvm::Constant>(getConstant(constant)), globalTy);
- isConstant = field->isFinal();
- }
+ init = ConstantExpr::getCast(getConstant(constant), globalTy);
+ isConstant = field->isFinal();
}
std::string globalName =
More information about the llvm-commits
mailing list