[llvm-commits] CVS: llvm-java/lib/Compiler/Compiler.cpp
Alkis Evlogimenos
alkis at cs.uiuc.edu
Mon May 24 22:54:01 PDT 2004
Changes in directory llvm-java/lib/Compiler:
Compiler.cpp updated: 1.21 -> 1.22
---
Log message:
Create basic blocks for default targets in switch statements.
---
Diffs of the changes: (+3 -0)
Index: llvm-java/lib/Compiler/Compiler.cpp
diff -u llvm-java/lib/Compiler/Compiler.cpp:1.21 llvm-java/lib/Compiler/Compiler.cpp:1.22
--- llvm-java/lib/Compiler/Compiler.cpp:1.21 Mon May 24 22:20:05 2004
+++ llvm-java/lib/Compiler/Compiler.cpp Mon May 24 22:50:51 2004
@@ -92,6 +92,9 @@
void do_switch(unsigned bcI,
unsigned defTarget,
const SwitchCases& sw) {
+ if (!bc2bbMap_[defTarget])
+ bc2bbMap_[defTarget] =
+ new BasicBlock("bb at bc" + utostr(defTarget), &function_);
for (unsigned i = 0; i < sw.size(); ++i) {
unsigned target = sw[i].second;
if (!bc2bbMap_[target])
More information about the llvm-commits
mailing list