[llvm-commits] CVS: llvm/lib/Bytecode/Reader/Reader.cpp
Jeff Cohen
jeffc at jolt-lang.org
Sun Dec 19 19:23:57 PST 2004
Changes in directory llvm/lib/Bytecode/Reader:
Reader.cpp updated: 1.149 -> 1.150
---
Log message:
Fix problems uncovered by VC++ (first time compiled by VC++)
---
Diffs of the changes: (+2 -1)
Index: llvm/lib/Bytecode/Reader/Reader.cpp
diff -u llvm/lib/Bytecode/Reader/Reader.cpp:1.149 llvm/lib/Bytecode/Reader/Reader.cpp:1.150
--- llvm/lib/Bytecode/Reader/Reader.cpp:1.149 Thu Dec 9 00:19:44 2004
+++ llvm/lib/Bytecode/Reader/Reader.cpp Sun Dec 19 21:23:46 2004
@@ -19,6 +19,7 @@
#include "Reader.h"
#include "llvm/Bytecode/BytecodeHandler.h"
#include "llvm/BasicBlock.h"
+#include "llvm/Config/alloca.h"
#include "llvm/Constants.h"
#include "llvm/Instructions.h"
#include "llvm/SymbolTable.h"
@@ -1501,7 +1502,7 @@
error("String constant data invalid!");
// Read character data. The type tells us how long the string is.
- char Data[ATy->getNumElements()];
+ char *Data = reinterpret_cast<char *>(alloca(ATy->getNumElements()));
read_data(Data, Data+ATy->getNumElements());
std::vector<Constant*> Elements(ATy->getNumElements());
More information about the llvm-commits
mailing list