Constructor from string and operator&

This commit is contained in:
Vsevolod Livinskiy
2015-02-20 13:08:03 +03:00
parent 5302cfe062
commit a3bf0b2406
2 changed files with 73 additions and 6 deletions

View File

@@ -1486,8 +1486,11 @@ void CWriter::printConstant(llvm::Constant *CPV, bool Static) {
Out << CI->getZExtValue() << 'u';
else if (Ty == llvm::Type::getInt64Ty(CPV->getContext()))
Out << CI->getZExtValue() << "ull";
else if (Ty->getPrimitiveSizeInBits() > 64)
else if (Ty->getPrimitiveSizeInBits() > 64) {
Out << "\"";
llvm::dyn_cast<llvm::Value>(CPV)->printAsOperand(Out, false);
Out << "\"";
}
else {
Out << "((";
printSimpleType(Out, Ty, false) << ')';
@@ -2343,8 +2346,8 @@ bool CWriter::doInitialization(llvm::Module &M) {
Out << "unsigned int putchar(unsigned int);\n";
Out << "int fflush(void *);\n";
Out << "int printf(const unsigned char *, ...);\n";
Out << "uint8_t *memcpy(uint8_t *, uint8_t *, uint64_t );\n";
Out << "uint8_t *memset(uint8_t *, uint8_t, uint64_t );\n";
// Out << "uint8_t *memcpy(uint8_t *, uint8_t *, uint64_t );\n";
// Out << "uint8_t *memset(uint8_t *, uint8_t, uint64_t );\n";
Out << "void memset_pattern16(void *, const void *, uint64_t );\n";
Out << "}\n\n";