forked from OSchip/llvm-project
Fix problems uncovered by VC++ (first time compiled by VC++)
llvm-svn: 19056
This commit is contained in:
parent
ac38f3a028
commit
be92640355
|
@ -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] == '/') {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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());
|
||||
|
|
Loading…
Reference in New Issue