Fix problems uncovered by VC++ (first time compiled by VC++)

llvm-svn: 19056
This commit is contained in:
Jeff Cohen 2004-12-20 03:23:46 +00:00
parent ac38f3a028
commit be92640355
3 changed files with 3 additions and 3 deletions

View File

@ -90,7 +90,6 @@ Archive::parseMemberHeader(const char*& At, const char* End) {
// a '/' and blanks.
std::string pathname;
unsigned index;
switch (Hdr->name[0]) {
case '#':
if (Hdr->name[1] == '1' && Hdr->name[2] == '/') {

View File

@ -293,7 +293,7 @@ Archive::writeMember(
ARFile.write(data,fSize);
// Make sure the member is an even length
if (ARFile.tellp() & 1 == 1)
if ((ARFile.tellp() & 1) == 1)
ARFile << ARFILE_PAD;
// Free the compressed data, if necessary

View File

@ -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 @@ void BytecodeReader::ParseStringConstants(unsigned NumEntries, ValueTable &Tab){
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());