mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-13 23:25:06 +00:00
Avoid going through the LLVMContext for type equality where it's safe to dereference the type pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92726 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -593,7 +593,7 @@ emitCallAndSwitchStatement(Function *newFunction, BasicBlock *codeReplacer,
|
||||
// this should be rewritten as a `ret'
|
||||
|
||||
// Check if the function should return a value
|
||||
if (OldFnRetTy == Type::getVoidTy(Context)) {
|
||||
if (OldFnRetTy->isVoidTy()) {
|
||||
ReturnInst::Create(Context, 0, TheSwitch); // Return void
|
||||
} else if (OldFnRetTy == TheSwitch->getCondition()->getType()) {
|
||||
// return what we have
|
||||
|
Reference in New Issue
Block a user