diff --git a/BitcodeEmitter.cpp b/BitcodeEmitter.cpp index 8351178..b2671f2 100644 --- a/BitcodeEmitter.cpp +++ b/BitcodeEmitter.cpp @@ -100,7 +100,7 @@ bool reportError(std::initializer_list const& what) { #define F llvm::Type::getFloatTy(getGlobalContext()) #define D llvm::Type::getDoubleTy(getGlobalContext()) -static const std::unordered_map> TYPE_MAP = { +static const std::unordered_map> TYPECAST_MAP = { {I64, { {I8, I64}, {I1, I64}, { F, D}, {D, D}}}, { I8, {{I64, I64}, {I1, I8}, { F, F}, {D, D}}}, { I1, {{I64, I64}, {I8, I8}, { F, F}, {D, D}}}, @@ -115,8 +115,8 @@ llvm::Type* deduceResultType(llvm::Value *left, llvm::Value *right) { if (lt == rt) return rt; - auto subTable = TYPE_MAP.find(lt); - if (subTable != TYPE_MAP.end()) { + auto subTable = TYPECAST_MAP.find(lt); + if (subTable != TYPECAST_MAP.end()) { auto resultType = subTable->second.find(rt); if (resultType != subTable->second.end()) return resultType->second; }