Use type shorthand macros in bitcode emitter.
This commit is contained in:
parent
a191342dec
commit
6e832cf2f4
|
@ -120,17 +120,17 @@ static
|
||||||
llvm::Type *LLVMType(Type const& type) {
|
llvm::Type *LLVMType(Type const& type) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case Type::INT:
|
case Type::INT:
|
||||||
return llvm::Type::getInt64Ty(getGlobalContext());
|
return I64;
|
||||||
case Type::CHAR:
|
case Type::CHAR:
|
||||||
return llvm::Type::getInt8Ty(getGlobalContext());
|
return I8;
|
||||||
case Type::FLOAT:
|
case Type::FLOAT:
|
||||||
return llvm::Type::getFloatTy(getGlobalContext());
|
return F;
|
||||||
case Type::BOOL:
|
case Type::BOOL:
|
||||||
return llvm::Type::getInt1Ty(getGlobalContext());
|
return I1;
|
||||||
case Type::DOUBLE:
|
case Type::DOUBLE:
|
||||||
return llvm::Type::getDoubleTy(getGlobalContext());
|
return D;
|
||||||
case Type::VOID:
|
case Type::VOID:
|
||||||
return llvm::Type::getVoidTy(getGlobalContext());
|
return V;
|
||||||
case Type::UNKNOWN:
|
case Type::UNKNOWN:
|
||||||
return nullptr; // FIXME
|
return nullptr; // FIXME
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue
Block a user